Skip to content

Commit b7377ce

Browse files
committed
Removed jsPath as no longer required
1 parent aec0d69 commit b7377ce

File tree

5 files changed

+1
-7
lines changed

5 files changed

+1
-7
lines changed

libs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ CSRFProtector configuration
1313

1414
- `errorRedirectionPage`: **Absolute url** of the file to which user should be redirected. <br>**Default: null**
1515
- `customErrorMessage`: **Error Message** to be shown to user. Only this text will be shown!<br>**Default: null**
16-
- `jsPath`: location of the js file **relative** to `config.php`. <br>**Default:** `../js/csrfprotector.js`
1716
- `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)
1817
- `tokenLength`: length of csrfp token, Default `10`
1918
- `secureCookie`: sets the "secure" HTTPS flag on the cookie. <br>**Default: `false`**

libs/config.sample.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Necessary configurations are (library would throw exception otherwise)
55
* ---- logDirectory
66
* ---- failedAuthAction
7-
* ---- jsPath
87
* ---- jsUrl
98
* ---- tokenLength
109
*/
@@ -16,7 +15,6 @@
1615
"POST" => 0),
1716
"errorRedirectionPage" => "",
1817
"customErrorMessage" => "",
19-
"jsPath" => "../js/csrfprotector.js",
2018
"jsUrl" => "",
2119
"tokenLength" => 10,
2220
"secureCookie" => false,

libs/csrf/csrfprotector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class csrfProtector
7272
* Contains list of those parameters that are required to be there
7373
* in config file for csrfp to work
7474
*/
75-
public static $requiredConfigurations = array('logDirectory', 'failedAuthAction', 'jsPath', 'jsUrl', 'tokenLength');
75+
public static $requiredConfigurations = array('logDirectory', 'failedAuthAction', 'jsUrl', 'tokenLength');
7676

7777
/*
7878
* Function: init

test/config.test.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* Necessary configurations are (library would throw exception otherwise)
55
* ---- logDirectory
66
* ---- failedAuthAction
7-
* ---- jsPath
87
* ---- jsUrl
98
* ---- tokenLength
109
*/
@@ -16,7 +15,6 @@
1615
"POST" => 0),
1716
"errorRedirectionPage" => "",
1817
"customErrorMessage" => "",
19-
"jsPath" => "../js/csrfprotector.js",
2018
"jsUrl" => "http://localhost/csrfp/js/csrfprotector.js",
2119
"tokenLength" => 10,
2220
"secureCookie" => false,

test/csrfprotector_test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public function setUp()
9090
{
9191
$this->logDir = __DIR__ .'/logs';
9292

93-
csrfprotector::$config['jsPath'] = '../js/csrfprotector.js';
9493
csrfprotector::$config['CSRFP_TOKEN'] = 'csrfp_token';
9594
csrfprotector::$config['secureCookie'] = false;
9695
csrfprotector::$config['logDirectory'] = '../test/logs';

0 commit comments

Comments
 (0)