Skip to content

Commit

Permalink
Merge branch 'master' into remotebrowsers
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhancock committed Oct 21, 2023
2 parents f93a781 + 87b2e45 commit 58233fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ let needSetup = false;
decoded.username,
]);

// Check if the password changed
if (decoded.h !== shake256(user.password, SHAKE256_LENGTH)) {
throw new Error("The token is invalid due to password change or old token");
}

if (user) {
// Check if the password changed
if (decoded.h !== shake256(user.password, SHAKE256_LENGTH)) {
throw new Error("The token is invalid due to password change or old token");
}

log.debug("auth", "afterLogin");
afterLogin(socket, user);
log.debug("auth", "afterLogin ok");
Expand Down

0 comments on commit 58233fc

Please sign in to comment.