diff --git a/src/server.js b/src/server.js index 6e49bc1a..70566c71 100644 --- a/src/server.js +++ b/src/server.js @@ -426,6 +426,7 @@ function initializeClient(socket, client, token, lastMessage, openChannel) { if (typeof p1 === "undefined" || p1 === "" || p1 !== p2) { socket.emit("change-password", { error: "", + success: false, }); return; } @@ -436,6 +437,7 @@ function initializeClient(socket, client, token, lastMessage, openChannel) { if (!matching) { socket.emit("change-password", { error: "password_incorrect", + success: false, }); return; } @@ -443,7 +445,7 @@ function initializeClient(socket, client, token, lastMessage, openChannel) { const hash = Helper.password.hash(p1); client.setPassword(hash, (success) => { - const obj = {}; + const obj = {success: false}; if (success) { obj.success = true;