mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
Use base32 for 2FA scratch token (#18384)
* Use base32 for 2FA scratch token * rename Secure* to Crypto*, add comments
This commit is contained in:
parent
4889ab52de
commit
49dd906753
11 changed files with 41 additions and 37 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue