Skip to content

Commit 79ec269

Browse files
committed
docs: add warning on redirect()
1 parent fc169d9 commit 79ec269

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

user_guide_src/source/libraries/security.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ may alter this behavior by editing the following config parameter value in
112112

113113
.. literalinclude:: security/004.php
114114

115+
.. warning:: If you use Cookie based CSRF protection, and :php:func:`redirect()`
116+
after the submission, you must call ``withCookie()`` to send the regenerated
117+
CSRF cookie. See :ref:`response-redirect` for details.
118+
115119
.. note:: Since v4.2.3, you can regenerate CSRF token manually with the
116120
``Security::generateHash()`` method.
117121

0 commit comments

Comments
 (0)