mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 23:21:45 +00:00
Merge pull request #1409 from superhacker777/patch-2
XSRFFormHtml() should also generate XSRF token.
This commit is contained in:
commit
58ed1436cc
@ -647,8 +647,8 @@ func (c *Controller) CheckXSRFCookie() bool {
|
|||||||
|
|
||||||
// XSRFFormHTML writes an input field contains xsrf token value.
|
// XSRFFormHTML writes an input field contains xsrf token value.
|
||||||
func (c *Controller) XSRFFormHTML() string {
|
func (c *Controller) XSRFFormHTML() string {
|
||||||
return "<input type=\"hidden\" name=\"_xsrf\" value=\"" +
|
return `<input type="hidden" name="_xsrf" value="` +
|
||||||
c._xsrfToken + "\"/>"
|
c.XSRFToken() + `" />`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetControllerAndAction gets the executing controller name and action name.
|
// GetControllerAndAction gets the executing controller name and action name.
|
||||||
|
Loading…
Reference in New Issue
Block a user