1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 19:10:54 +00:00
This commit is contained in:
astaxie 2013-09-22 14:35:01 +08:00
parent 797bd98269
commit beecc5072e

View File

@ -335,9 +335,7 @@ func (c *Controller) CheckXsrfCookie() bool {
}
if token == "" {
c.Ctx.Abort(403, "'_xsrf' argument missing from POST")
}
if c._xsrf_token != token {
} else if c._xsrf_token != token {
c.Ctx.Abort(403, "XSRF cookie does not match POST argument")
}
return true