Browse Source

Increase default TOTP secret size to 320 bits (#4287)

for-closed-social
Clar Charr 6 years ago
committed by techknowlogick
parent
commit
c71ee33057
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      routers/user/setting/security_twofa.go

+ 1
- 0
routers/user/setting/security_twofa.go View File

@ -76,6 +76,7 @@ func twofaGenerateSecretAndQr(ctx *context.Context) bool {
if otpKey == nil {
err = nil // clear the error, in case the URL was invalid
otpKey, err = totp.Generate(totp.GenerateOpts{
SecretSize: 40,
Issuer: setting.AppName + " (" + strings.TrimRight(setting.AppURL, "/") + ")",
AccountName: ctx.User.Name,
})

Loading…
Cancel
Save