mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-19 14:46:36 +02:00
Only update bcrypt password rounds if the password actually matches
This commit is contained in:
parent
1f1b025b81
commit
b46f92c7d8
|
@ -287,7 +287,7 @@ function localAuth(client, user, password, callback) {
|
|||
Helper.password
|
||||
.compare(password, client.config.password)
|
||||
.then(matching => {
|
||||
if (Helper.password.requiresUpdate(client.config.password)) {
|
||||
if (matching && Helper.password.requiresUpdate(client.config.password)) {
|
||||
const hash = Helper.password.hash(password);
|
||||
|
||||
client.setPassword(hash, success => {
|
||||
|
|
Loading…
Reference in a new issue