Skip to content

Commit 2060447

Browse files
authored
Merge pull request #5230 from kenjis/fix-docs-csrf
Fix user guide on CSRF
2 parents fec6ed7 + 485a0c3 commit 2060447

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

user_guide_src/source/concepts/security.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ CodeIgniter provisions
5757
----------------------
5858

5959
- `Session <../libraries/sessions.html>`_ library
60-
- `HTTP library <../incoming/incomingrequest.html>`_ provides for CSRF validation
60+
- :doc:`Security </libraries/security>` library provides for CSRF validation
6161
- Easy to add third party authentication
6262

6363
*****************************
@@ -162,7 +162,7 @@ CodeIgniter provisions
162162
----------------------
163163

164164
- Public folder, with application and system outside
165-
- `HTTP library <../incoming/incomingrequest.html>`_ provides for CSRF validation
165+
- :doc:`Security </libraries/security>` library provides for CSRF validation
166166

167167
************************************
168168
A8 Cross Site Request Forgery (CSRF)
@@ -181,7 +181,7 @@ OWASP recommendations
181181
CodeIgniter provisions
182182
----------------------
183183

184-
- `HTTP library <../incoming/incomingrequest.html>`_ provides for CSRF validation
184+
- :doc:`Security </libraries/security>` library provides for CSRF validation
185185

186186
**********************************************
187187
A9 Using Components with Known Vulnerabilities

user_guide_src/source/general/configuration.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,7 @@ the configuration class properties are left unchanged. In this usage, the prefix
165165
the full (case-sensitive) namespace of the class.
166166
::
167167

168-
Config\App.CSRFProtection = true
169-
Config\App.CSRFCookieName = csrf_cookie
168+
Config\App.forceGlobalSecureRequests = true
170169
Config\App.CSPEnabled = true
171170

172171

@@ -177,17 +176,15 @@ the configuration class name. If the short prefix matches the class name,
177176
the value from **.env** replaces the configuration file value.
178177
::
179178

180-
app.CSRFProtection = true
181-
app.CSRFCookieName = csrf_cookie
179+
app.forceGlobalSecureRequests = true
182180
app.CSPEnabled = true
183181

184182
.. note:: When using the *short prefix* the property names must still exactly match the class defined name.
185183

186184
Some environments do not permit variable name with dots. In such case, you could also use ``_`` as a seperator.
187185
::
188186

189-
app_CSRFProtection = true
190-
app_CSRFCookieName = csrf_cookie
187+
app_forceGlobalSecureRequests = true
191188
app_CSPEnabled = true
192189

193190
Environment Variables as Replacements for Data

user_guide_src/source/libraries/throttler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ filter::
117117
Next, we assign it to all POST requests made on the site::
118118

119119
public $methods = [
120-
'post' => ['throttle', 'CSRF'],
120+
'post' => ['throttle', 'csrf'],
121121
];
122122

123123
And that's all there is to it. Now all POST requests made on the site will have to be rate limited.

0 commit comments

Comments
 (0)