8000 minor #10905 Documented the new csrf_token field prefix (javiereguiluz) · symfony/symfony-docs@ef64a7e · GitHub
[go: up one dir, main page]

Skip to content

Commit ef64a7e

Browse files
committed
minor #10905 Documented the new csrf_token field prefix (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Documented the new csrf_token field prefix Fixes #10884. Commits ------- ea1dea0 Documented the new csrf_token field prefix
2 parents 8a5f600 + ea1dea0 commit ef64a7e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

security/csrf.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ this can be customized on a form-by-form basis::
108108
// ...
109109
}
110110

111+
You can also customize the rendering of the CSRF form field creating a custom
112+
:doc:`form theme </form/form_themes>` and using ``csrf_token`` as the prefix of
113+
the field (e.g. define ``{% block csrf_token_widget %} ... {% endblock %}`` to
114+
customize the entire form field contents).
115+
116+
.. versionadded:: 4.3
117+
118+
The ``csrf_token`` form field prefix was introduced in Symfony 4.3.
119+
111120
CSRF Protection in Login Forms
112121
------------------------------
113122

0 commit comments

Comments
 (0)
0