File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
user_guide_src/source/libraries Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,9 @@ Token Regeneration
107
107
------------------
108
108
109
109
Tokens may be either regenerated on every submission (default) or
110
- kept the same throughout the life of the CSRF cookie. The default
110
+ kept the same throughout the life of the Session or CSRF cookie.
111
+
112
+ The default
111
113
regeneration of tokens provides stricter security, but may result
112
114
in usability concerns as other tokens become invalid (back/forward
113
115
navigation, multiple tabs/windows, asynchronous actions, etc). You
@@ -116,6 +118,10 @@ may alter this behavior by editing the following config parameter value in
116
118
117
119
.. literalinclude :: security/004.php
118
120
121
+ .. warning :: If you use Cookie based CSRF protection, and :php:func:`redirect()`
122
+ after the submission, you must call ``withCookie() `` to send the regenerated
123
+ CSRF cookie. See :ref: `response-redirect ` for details.
124
+
119
125
.. note :: Since v4.2.3, you can regenerate CSRF token manually with the
120
126
``Security::generateHash() `` method.
121
127
You can’t perform that action at this time.
0 commit comments