mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-08 00:32:19 +02:00
Don't check for existing password emptyness
Pointed out by @PugaBear, it's possible for a user to have an empty password. There isn't really a need to check for password emptyness, it will simply fail with wrong old password instead.
This commit is contained in:
parent
973fa0f4b2
commit
0b6d13d22d
|
@ -137,12 +137,6 @@ function init(socket, client, token) {
|
|||
var old = data.old_password;
|
||||
var p1 = data.new_password;
|
||||
var p2 = data.verify_password;
|
||||
if (typeof old === "undefined" || old === "") {
|
||||
socket.emit("change-password", {
|
||||
error: "Please enter your current password"
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (typeof p1 === "undefined" || p1 === "") {
|
||||
socket.emit("change-password", {
|
||||
error: "Please enter a new password"
|
||||
|
|
Loading…
Reference in a new issue