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