mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-02-18 08:32:57 +00:00
Add guardrail for disable 2fa
This commit is contained in:
@@ -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