From 49dd9067535538771ef13623ed1dd9698a4a2151 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Wed, 26 Jan 2022 12:10:10 +0800 Subject: Use base32 for 2FA scratch token (#18384) * Use base32 for 2FA scratch token * rename Secure* to Crypto*, add comments --- modules/generate/generate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/generate') 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 } -- cgit v1.2.3