mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-22 06:03:10 +01:00
Add guardrail for disable 2fa
This commit is contained in:
1 parent
011191f645
commit
1d14f72ba5
1 file changed
+6
-3
@@ -161,9 +161,12 @@ const internal2fa = {
|
||||
}
|
||||
|
||||
const result = await verify({
|
||||
token: code,
|
||||
secret: auth.meta.totp_secret,
|
||||
});
|
||||
token: code,
|
||||
secret: auth.meta.totp_secret,
|
||||
guardrails: createGuardrails({
|
||||
MIN_SECRET_BYTES: 10,
|
||||
}),
|
||||
});
|
||||
|
||||
if (!result.valid) {
|
||||
throw new errs.AuthError("Invalid verification code");
|
||||
|
||||
Reference in new issue
Block a user