summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-04 11:37:15 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-04 11:37:15 -0500
commit0c5ba4573aecc9eaed669e9431a70a5d9f184b8d (patch)
treeaaca06a83f8c6d827a728a9a672d53b7d2187464 /modules
parent69a98236bdab4345c8b397a5a91f5e5abf745b42 (diff)
downloadgitea-0c5ba4573aecc9eaed669e9431a70a5d9f184b8d.tar.gz
gitea-0c5ba4573aecc9eaed669e9431a70a5d9f184b8d.zip
fix session API broken and SQL pretection
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 64c32ec73a..99116fff70 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -394,9 +394,6 @@ func newSessionService() {
SessionConfig.EnableSetCookie = Cfg.MustBool("session", "ENABLE_SET_COOKIE", true)
SessionConfig.Gclifetime = Cfg.MustInt64("session", "GC_INTERVAL_TIME", 86400)
SessionConfig.Maxlifetime = Cfg.MustInt64("session", "SESSION_LIFE_TIME", 86400)
- SessionConfig.SessionIDHashFunc = Cfg.MustValueRange("session", "SESSION_ID_HASHFUNC",
- "sha1", []string{"sha1", "sha256", "md5"})
- SessionConfig.SessionIDHashKey = Cfg.MustValue("session", "SESSION_ID_HASHKEY", string(com.RandomCreateBytes(16)))
if SessionProvider == "file" {
os.MkdirAll(path.Dir(SessionConfig.ProviderConfig), os.ModePerm)