1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 03:11:30 +00:00

XSRFFormHtml() should also generate XSRF token.

This commit is contained in:
Mikhail Devyatov 2015-10-27 20:16:47 +03:00
parent 912abe3272
commit 5d18a7466c

View File

@ -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.