aboutsummaryrefslogtreecommitdiff
path: root/internal/route/install.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-04-14 09:41:54 +0800
committerGitHub <noreply@github.com>2020-04-14 09:41:54 +0800
commitcb439a126aa6a2728e423bcfd0d5e948337b8ddb (patch)
treef7d09181fe5b96ea444f7544091673b3c668b9fe /internal/route/install.go
parent659acd48b1a131476fd98a54604fa6416b1cef9d (diff)
db: add tests for two factors (#6099)
* Rename to TwoFactors.Create * Use GORM to execute queries * TwoFactor.GetByUserID * Add tests * Fix failing tests * Add MD5 tests * Add tests for RandomChars
Diffstat (limited to 'internal/route/install.go')
-rw-r--r--internal/route/install.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/install.go b/internal/route/install.go
index 5bbf943a..8c9d2eda 100644
--- a/internal/route/install.go
+++ b/internal/route/install.go
@@ -27,8 +27,8 @@ import (
"gogs.io/gogs/internal/markup"
"gogs.io/gogs/internal/osutil"
"gogs.io/gogs/internal/ssh"
+ "gogs.io/gogs/internal/strutil"
"gogs.io/gogs/internal/template/highlight"
- "gogs.io/gogs/internal/tool"
)
const (
@@ -365,7 +365,7 @@ func InstallPost(c *context.Context, f form.Install) {
cfg.Section("log").Key("ROOT_PATH").SetValue(f.LogRootPath)
cfg.Section("security").Key("INSTALL_LOCK").SetValue("true")
- secretKey, err := tool.RandomString(15)
+ secretKey, err := strutil.RandomChars(15)
if err != nil {
c.RenderWithErr(c.Tr("install.secret_key_failed", err), INSTALL, &f)
return