mirror of
https://github.com/go-gitea/gitea
synced 2025-07-12 13:37:20 +00:00
Implements generator cli for secrets (#3531)
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
This commit is contained in:
committed by
Lauris BH
parent
e59fe7c8d9
commit
96c268c0fc
@ -20,7 +20,7 @@ import (
|
||||
gouuid "github.com/satori/go.uuid"
|
||||
"gopkg.in/ini.v1"
|
||||
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/generate"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
)
|
||||
@ -539,10 +539,10 @@ func generateOrgRandsAndSalt(x *xorm.Engine) (err error) {
|
||||
}
|
||||
|
||||
for _, org := range orgs {
|
||||
if org.Rands, err = base.GetRandomString(10); err != nil {
|
||||
if org.Rands, err = generate.GetRandomString(10); err != nil {
|
||||
return err
|
||||
}
|
||||
if org.Salt, err = base.GetRandomString(10); err != nil {
|
||||
if org.Salt, err = generate.GetRandomString(10); err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err = sess.Id(org.ID).Update(org); err != nil {
|
||||
|
Reference in New Issue
Block a user