summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/server.js b/server.js
index 8ba605f..380e14d 100644
--- a/server.js
+++ b/server.js
@@ -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')
})