fix(backend): Stringify return value when updating hash
This commit is contained in:
parent
d8134314c6
commit
6837f1c8df
1 changed files with 5 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue