aboutsummaryrefslogtreecommitdiff
path: root/internal/tool
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-22 20:46:16 +0800
committerᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-22 20:46:16 +0800
commit286fbc07e985d960209e8443a57e7f95efe60efd (patch)
treedd3d0d38081fa258751004472695c8fdc6885e43 /internal/tool
parenta7e53b8134eefcbaa60a2755da8518dd08471a69 (diff)
conf: overhaul security settings
Diffstat (limited to 'internal/tool')
-rw-r--r--internal/tool/tool.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/tool/tool.go b/internal/tool/tool.go
index 37c51dd1..2120fac3 100644
--- a/internal/tool/tool.go
+++ b/internal/tool/tool.go
@@ -170,7 +170,7 @@ func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string
// create sha1 encode string
sh := sha1.New()
- _, _ = sh.Write([]byte(data + conf.SecretKey + startStr + endStr + com.ToStr(minutes)))
+ _, _ = sh.Write([]byte(data + conf.Security.SecretKey + startStr + endStr + com.ToStr(minutes)))
encoded := hex.EncodeToString(sh.Sum(nil))
code := fmt.Sprintf("%s%06d%s", startStr, minutes, encoded)