Commit 88f74ec3 authored by ale's avatar ale
Browse files

Fix again the OTP check

parent d5f5e4c7
Pipeline #25180 passed with stages
in 3 minutes and 34 seconds
......@@ -348,7 +348,7 @@ func (r *EnableOTPRequest) Validate(_ *RequestContext) error {
// Only check if the client-side secret is set, skip otherwise. We
// don't really expect a bad value coming from the generator, so the
// length check is just for internal consistency.
if r.TOTPSecret != "" && (len(r.TOTPSecret) < 16 || len(r.TOTPSecret) > 48) {
if r.TOTPSecret != "" && len(r.TOTPSecret) < 10 {
err = newValidationError(err, "totp_secret", "bad value")
}
return err.orNil()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment