diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-01-26 12:10:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-26 12:10:10 +0800 |
commit | 49dd9067535538771ef13623ed1dd9698a4a2151 (patch) | |
tree | 7a06ff053683e50d93ad50ce25585a13d54c41e5 /routers/web/auth/openid.go | |
parent | 4889ab52de0b390bb6e96ad6a64ee082585b3d79 (diff) | |
download | gitea-49dd9067535538771ef13623ed1dd9698a4a2151.tar.gz gitea-49dd9067535538771ef13623ed1dd9698a4a2151.zip |
Use base32 for 2FA scratch token (#18384)
* Use base32 for 2FA scratch token
* rename Secure* to Crypto*, add comments
Diffstat (limited to 'routers/web/auth/openid.go')
-rw-r--r-- | routers/web/auth/openid.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/auth/openid.go b/routers/web/auth/openid.go index e0c6069546..f3189887a5 100644 --- a/routers/web/auth/openid.go +++ b/routers/web/auth/openid.go @@ -416,7 +416,7 @@ func RegisterOpenIDPost(ctx *context.Context) { if length < 256 { length = 256 } - password, err := util.RandomString(int64(length)) + password, err := util.CryptoRandomString(int64(length)) if err != nil { ctx.RenderWithErr(err.Error(), tplSignUpOID, form) return |