You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libs/README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,19 @@ CSRFProtector configuration
2
2
==========================================
3
3
4
4
-`CSRFP_TOKEN`: name of the csrf nonce, used for cookie or posting as argument. default: `csrfp_token` (if left blank)
5
-
-`logDirectory`: location of the directory at which log files will be saved**relative** to `config.php` file. This is required for file based logging (default), Not needed, in case you override logging function to implement your logging logic. (View [Overriding logging function](https://github.com/mebjas/CSRF-Protector-PHP/wiki/Overriding-logging-function))
5
+
-`logDirectory`: location of the directory at which log files will be saved, either **relative** to the default `config.php` file location or an **absolute** path. This is required for file based logging (default), Not needed, in case you override logging function to implement your logging logic. (View [Overriding logging function](https://github.com/mebjas/CSRF-Protector-PHP/wiki/Overriding-logging-function))
6
6
<br>**Default value:**`../log/`
7
7
-`failedAuthAction`: Action code (integer) for action to be taken in case of failed validation. Has two different values for bot `GET` and `POST`. Different action codes are specified as follows, (<br>**Default:**`0` for both `GET` & `POST`):
8
-
*`0` Send **403, Forbidden** Header
9
-
*`1`**Strip the POST/GET query** and forward the request! unset($_POST)
10
-
*`2`**Redirect to custom error page** mentioned in `errorRedirectionPage`
11
-
*`3`**Show custom error message** to user, mentioned in `customErrorMessage`
12
-
*`4` Send **500, Internal Server Error** header
8
+
*`0` Send **403, Forbidden** Header
9
+
*`1`**Strip the POST/GET query** and forward the request! unset($_POST)
10
+
*`2`**Redirect to custom error page** mentioned in `errorRedirectionPage`
11
+
*`3`**Show custom error message** to user, mentioned in `customErrorMessage`
12
+
*`4` Send **500, Internal Server Error** header
13
13
14
14
-`errorRedirectionPage`: **Absolute url** of the file to which user should be redirected. <br>**Default: null**
15
15
-`customErrorMessage`: **Error Message** to be shown to user. Only this text will be shown!<br>**Default: null**
16
-
-`jsUrl`: **Absolute url** of the js file. (See [Setting up](https://github.com/mebjas/CSRF-Protector-PHP/wiki/Setting-up-CSRF-Protector-PHP-in-your-web-application) for more information)
16
+
-`jsUrl`: **Absolute url** of the js file or `FALSE` if the js file will be added to the page manually. (See [Setting up](https://github.com/mebjas/CSRF-Protector-PHP/wiki/Setting-up-CSRF-Protector-PHP-in-your-web-application) for more information)
17
17
-`tokenLength`: length of csrfp token, Default `10`
18
-
-`cookieConfig`: Array of parameter values for set cookie method. supports three properties: `path`, `domain`, `secure`. They have same meaning as respective parameters of `setcookie` method: [learn more - php.net]
18
+
-`cookieConfig`: Array of parameter values for set cookie method. supports three properties: `path`, `domain`, `secure` and `expire`. They have same meaning as respective parameters of `setcookie` method: [learn more - php.net]
19
19
-`disabledJavascriptMessage`: messaged to be shown if js is disabled (string)
20
20
-`verifyGetFor`: regex rules for those urls for which csrfp validation should be enabled for `GET` requests also. (View [verifyGetFor rules](https://github.com/mebjas/CSRF-Protector-PHP/wiki/verifyGetFor-rules) for more information)
Copy file name to clipboardExpand all lines: libs/config.sample.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,8 @@
20
20
"cookieConfig" => array(
21
21
"path" => '',
22
22
"domain" => '',
23
-
"secure" => false
23
+
"secure" => false,
24
+
"expire" => '',
24
25
),
25
26
"disabledJavascriptMessage" => "This site attempts to protect users against <a href=\"https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29\">
26
27
Cross-Site Request Forgeries </a> attacks. In order to do so, you must have JavaScript enabled in your web browser otherwise this site will fail to work correctly for you.
0 commit comments