Skip to content

Commit 537867a

Browse files
committed
docs: add Session based CSRF Protection
1 parent 991c412 commit 537867a

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

user_guide_src/source/libraries/security.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,22 @@ than simply crashing. This can be turned off by editing the following config par
120120

121121
Even when the redirect value is **true**, AJAX calls will not redirect, but will throw an error.
122122

123+
=======================
124+
CSRF Protection Methods
125+
=======================
126+
127+
By default, the Cookie based CSRF Protection is used. It is
128+
`Double Submit Cookie <https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#double-submit-cookie>`_
129+
on OWASP Cross-Site Request Forgery Prevention Cheat Sheet.
130+
131+
You can also use Session based CSRF Protection. It is
132+
`Synchronizer Token Pattern <https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#synchronizer-token-pattern>`_.
133+
134+
You can set to use the Session based CSRF protection by editing the following config parameter value in
135+
**app/Config/Security.php**::
136+
137+
public $csrfProtection = 'session';
138+
123139
*********************
124140
Other Helpful Methods
125141
*********************

0 commit comments

Comments
 (0)