59a67720 by astaxie

xsrf's defaut time set to 0 & fix ts not use

1 parent 93e1206d
...@@ -77,7 +77,7 @@ func init() { ...@@ -77,7 +77,7 @@ func init() {
77 HttpServerTimeOut = 0 77 HttpServerTimeOut = 0
78 ErrorsShow = true 78 ErrorsShow = true
79 XSRFKEY = "beegoxsrf" 79 XSRFKEY = "beegoxsrf"
80 XSRFExpire = 60 80 XSRFExpire = 0
81 TemplateLeft = "{{" 81 TemplateLeft = "{{"
82 TemplateRight = "}}" 82 TemplateRight = "}}"
83 ParseConfig() 83 ParseConfig()
......
...@@ -323,8 +323,6 @@ func (c *Controller) GetSecureCookie(Secret, key string) (string, bool) { ...@@ -323,8 +323,6 @@ func (c *Controller) GetSecureCookie(Secret, key string) (string, bool) {
323 return "", false 323 return "", false
324 } 324 }
325 325
326 ts, _ := strconv.ParseInt(timestamp, 0, 64)
327
328 buf := bytes.NewBufferString(val) 326 buf := bytes.NewBufferString(val)
329 encoder := base64.NewDecoder(base64.StdEncoding, buf) 327 encoder := base64.NewDecoder(base64.StdEncoding, buf)
330 328
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!