diff --git a/sites/backend/src/models/user.mjs b/sites/backend/src/models/user.mjs index ea83405599a..2eec2e853da 100644 --- a/sites/backend/src/models/user.mjs +++ b/sites/backend/src/models/user.mjs @@ -1519,7 +1519,7 @@ UserModel.prototype.guardedMfaUpdate = async function ({ body, user, ip }) { this.clear.data.mfaScratchCodes ) let result, mfaScratchCodes - if (Array.isArray(check)) [result, mfaScratchCodes] = check + if (Array.isArray(check)) [result] = check else result = check if (result) { /* @@ -1557,7 +1557,7 @@ UserModel.prototype.guardedMfaUpdate = async function ({ body, user, ip }) { */ const check = await this.mfa.verify(body.token, this.clear.mfaSecret, false) let result, mfaScratchCodes - if (Array.isArray(check)) [result, mfaScratchCodes] = check + if (Array.isArray(check)) [result] = check else result = check if (body.secret === this.clear.mfaSecret && result) { /*