mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:00:54 +00:00
beego: enhance the XSRFKEY from 15 to 32 #620
This commit is contained in:
parent
3f7e91e6a4
commit
9083927c6a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user