Commit 9083927c authored by astaxie's avatar astaxie

beego: enhance the XSRFKEY from 15 to 32 #620

parent 3f7e91e6
......@@ -452,7 +452,7 @@ func (c *Controller) XsrfToken() string {
} else {
expire = int64(XSRFExpire)
}
token = string(utils.RandomCreateBytes(15))
token = string(utils.RandomCreateBytes(32))
c.SetSecureCookie(XSRFKEY, "_xsrf", token, expire)
}
c._xsrf_token = token
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment