Commit 5d18a746 authored by Mikhail Devyatov's avatar Mikhail Devyatov

XSRFFormHtml() should also generate XSRF token.

parent 912abe32
...@@ -647,8 +647,8 @@ func (c *Controller) CheckXSRFCookie() bool { ...@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment