1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 04:00:50 +00:00

beego: enhance the XSRFKEY from 15 to 32 #620

This commit is contained in:
astaxie 2014-05-27 15:00:10 +08:00
parent 3f7e91e6a4
commit 9083927c6a

View File

@ -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