Commit beecc507 authored by astaxie's avatar astaxie

fix #209

parent 797bd982
...@@ -335,9 +335,7 @@ func (c *Controller) CheckXsrfCookie() bool { ...@@ -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
......
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