From 59a67720b46524584f26d54aa09a1f14d9c90efe Mon Sep 17 00:00:00 2001 From: astaxie Date: Wed, 25 Sep 2013 23:07:54 +0800 Subject: [PATCH] xsrf's defaut time set to 0 & fix ts not use --- config.go | 2 +- controller.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/config.go b/config.go index 9834ac45..1ffe52d1 100644 --- a/config.go +++ b/config.go @@ -77,7 +77,7 @@ func init() { HttpServerTimeOut = 0 ErrorsShow = true XSRFKEY = "beegoxsrf" - XSRFExpire = 60 + XSRFExpire = 0 TemplateLeft = "{{" TemplateRight = "}}" ParseConfig() diff --git a/controller.go b/controller.go index f036f9cb..74c55b74 100644 --- a/controller.go +++ b/controller.go @@ -323,8 +323,6 @@ func (c *Controller) GetSecureCookie(Secret, key string) (string, bool) { return "", false } - ts, _ := strconv.ParseInt(timestamp, 0, 64) - buf := bytes.NewBufferString(val) encoder := base64.NewDecoder(base64.StdEncoding, buf)