Commit beecc507 authored by astaxie's avatar astaxie

fix #209

parent 797bd982
......@@ -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
......
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