summaryrefslogtreecommitdiffstats
path: root/modules/generate
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-01-26 12:10:10 +0800
committerGitHub <noreply@github.com>2022-01-26 12:10:10 +0800
commit49dd9067535538771ef13623ed1dd9698a4a2151 (patch)
tree7a06ff053683e50d93ad50ce25585a13d54c41e5 /modules/generate
parent4889ab52de0b390bb6e96ad6a64ee082585b3d79 (diff)
downloadgitea-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 'modules/generate')
-rw-r--r--modules/generate/generate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/generate/generate.go b/modules/generate/generate.go
index ae9aeee18b..326fe8036b 100644
--- a/modules/generate/generate.go
+++ b/modules/generate/generate.go
@@ -60,7 +60,7 @@ func NewJwtSecretBase64() (string, error) {
// NewSecretKey generate a new value intended to be used by SECRET_KEY.
func NewSecretKey() (string, error) {
- secretKey, err := util.RandomString(64)
+ secretKey, err := util.CryptoRandomString(64)
if err != nil {
return "", err
}