1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 04:40:53 +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 == "" { if token == "" {
c.Ctx.Abort(403, "'_xsrf' argument missing from POST") c.Ctx.Abort(403, "'_xsrf' argument missing from POST")
} } else if c._xsrf_token != token {
if c._xsrf_token != token {
c.Ctx.Abort(403, "XSRF cookie does not match POST argument") c.Ctx.Abort(403, "XSRF cookie does not match POST argument")
} }
return true return true