mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 20:10:50 +00:00
fix #209
This commit is contained in:
parent
797bd98269
commit
beecc5072e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user