diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-12-21 14:12:36 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-01-31 12:39:03 +0100 |
commit | 61fc6ea9dcdcbf5454ad85cae32120c9d5d4c8b4 (patch) | |
tree | 29e5fd3833537df598a85dc25f2477a0b74627db | |
parent | 00916460c8261473b2afce60853c406f10aee6c0 (diff) | |
download | server-61fc6ea9dcdcbf5454ad85cae32120c9d5d4c8b4.tar.gz |
Oops. Fix change password bug.
-rw-r--r-- | server.js | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -537,6 +537,7 @@ app.post('/change-password', must_be_logged_in, function (req, res) { return res.render('change_password.pug', { user: req.user, flash: "Wrong password!" }) let salt = crypto.randomBytes(32).toString('hex') let hash = hash_password(newpass, salt) + SQL_UPDATE_USER_PASSWORD.run(hash, salt, user.user_id) return res.redirect('/profile') }) |