File tree Expand file tree Collapse file tree
user_guide_src/source/libraries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,7 +107,9 @@ Token Regeneration
107107------------------
108108
109109Tokens 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
111113regeneration of tokens provides stricter security, but may result
112114in usability concerns as other tokens become invalid (back/forward
113115navigation, multiple tabs/windows, asynchronous actions, etc). You
@@ -116,6 +118,10 @@ may alter this behavior by editing the following config parameter value in
116118
117119.. literalinclude :: security/004.php
118120
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+
119125.. note :: Since v4.2.3, you can regenerate CSRF token manually with the
120126 ``Security::generateHash() `` method.
121127
You can’t perform that action at this time.
0 commit comments