Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai3
accountserver
Commits
88f74ec3
Commit
88f74ec3
authored
Dec 10, 2021
by
ale
Browse files
Fix again the OTP check
parent
d5f5e4c7
Pipeline
#25180
passed with stages
in 3 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
actions_user.go
View file @
88f74ec3
...
...
@@ -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
)
<
1
6
||
len
(
r
.
TOTPSecret
)
>
48
)
{
if
r
.
TOTPSecret
!=
""
&&
len
(
r
.
TOTPSecret
)
<
1
0
{
err
=
newValidationError
(
err
,
"totp_secret"
,
"bad value"
)
}
return
err
.
orNil
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment