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 New Issue
Block a user