mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-30 18:07:50 +01:00
Merge pull request #5303 from 7heMech/fix-2fa-logout
Add guardrail to fix disabling 2fa
This commit is contained in:
1 file changed
+6
-3
@@ -161,9 +161,12 @@ const internal2fa = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const result = await verify({
|
const result = await verify({
|
||||||
token: code,
|
token: code,
|
||||||
secret: auth.meta.totp_secret,
|
secret: auth.meta.totp_secret,
|
||||||
});
|
guardrails: createGuardrails({
|
||||||
|
MIN_SECRET_BYTES: 10,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
if (!result.valid) {
|
if (!result.valid) {
|
||||||
throw new errs.AuthError("Invalid verification code");
|
throw new errs.AuthError("Invalid verification code");
|
||||||
|
|||||||
Reference in new issue
Block a user