1
0
Fork 0

fix(backend): Stringify return value when updating hash

This commit is contained in:
joostdecock 2022-10-31 08:39:41 +01:00
parent d8134314c6
commit 6837f1c8df

View file

@ -146,8 +146,11 @@ export function verifyPassword(input, passwordField) {
if (data.type === 'v2') {
const result = verifyLegacyPassword(input, data.data)
if (result) {
// Correct password for legacy password. Re-hash and return.
return [true, hashPassword(input)]
/*
* Correct password for legacy password field.
* Re-hash and return updated password field value.
*/
return [true, JSON.stringify(hashPassword(input))]
}
} else if (data.type === 'v3') {
if (data.hash && data.salt) {