#230
Showing
1 changed file
with
1 additions
and
9 deletions
| ... | @@ -375,16 +375,8 @@ func (c *Controller) CheckXsrfCookie() bool { | ... | @@ -375,16 +375,8 @@ func (c *Controller) CheckXsrfCookie() bool { |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | func (c *Controller) XsrfFormHtml() string { | 377 | func (c *Controller) XsrfFormHtml() string { |
| 378 | var expire int64 | ||
| 379 | if c.XSRFExpire > 0 { | ||
| 380 | expire = int64(c.XSRFExpire) | ||
| 381 | } else { | ||
| 382 | expire = int64(XSRFExpire) | ||
| 383 | } | ||
| 384 | token := GetRandomString(15) | ||
| 385 | c.SetSecureCookie(XSRFKEY, "_xsrf", token, expire) | ||
| 386 | return "<input type=\"hidden\" name=\"_xsrf\" value=\"" + | 378 | return "<input type=\"hidden\" name=\"_xsrf\" value=\"" + |
| 387 | token + "\"/>" | 379 | c._xsrf_token + "\"/>" |
| 388 | } | 380 | } |
| 389 | 381 | ||
| 390 | func (c *Controller) GoToFunc(funcname string) { | 382 | func (c *Controller) GoToFunc(funcname string) { | ... | ... |
-
Please register or sign in to post a comment