xsrf fix
This commit is contained in:
parent
809627b538
commit
4fe6ea043f
1 changed files with 1 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ func (c *Context) File(name string) (io.Reader, string, error) {
|
||||||
|
|
||||||
// CheckXsrf validates the xsrf token
|
// CheckXsrf validates the xsrf token
|
||||||
func (c *Context) CheckXsrf() (ok bool) {
|
func (c *Context) CheckXsrf() (ok bool) {
|
||||||
ok = checkXsrf(c.Form("token"), c.Token.RawSig()[:keySize])
|
ok = checkXsrf(c.Form("token"), c.Token.RawSig())
|
||||||
if !ok {
|
if !ok {
|
||||||
c.Error("wrong csrf token")
|
c.Error("wrong csrf token")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue