forked from forgejo/forgejo
Implements generator cli for secrets (#3531)
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
This commit is contained in:
parent
e59fe7c8d9
commit
96c268c0fc
12 changed files with 215 additions and 67 deletions
|
@ -13,6 +13,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/auth/openid"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/generate"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
|
||||
|
@ -348,7 +349,7 @@ func RegisterOpenIDPost(ctx *context.Context, cpt *captcha.Captcha, form auth.Si
|
|||
if len < 256 {
|
||||
len = 256
|
||||
}
|
||||
password, err := base.GetRandomString(len)
|
||||
password, err := generate.GetRandomString(len)
|
||||
if err != nil {
|
||||
ctx.RenderWithErr(err.Error(), tplSignUpOID, form)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue