Skip to content

Commit c71ee33

Browse files
Clar Charrtechknowlogick
Clar Charr
authored andcommitted
Increase default TOTP secret size to 320 bits (#4287)
1 parent 9d4c1dd commit c71ee33

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

routers/user/setting/security_twofa.go

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func twofaGenerateSecretAndQr(ctx *context.Context) bool {
7676
if otpKey == nil {
7777
err = nil // clear the error, in case the URL was invalid
7878
otpKey, err = totp.Generate(totp.GenerateOpts{
79+
SecretSize: 40,
7980
Issuer: setting.AppName + " (" + strings.TrimRight(setting.AppURL, "/") + ")",
8081
AccountName: ctx.User.Name,
8182
})

0 commit comments

Comments
 (0)