Skip to content

Commit

Permalink
Added base_url variable to csrf config
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlawrence committed Dec 21, 2015
1 parent a634c58 commit 763dbf3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/csrf_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"errorRedirectionPage" => "",
"customErrorMessage" => "",
"jsPath" => "vendor/owasp/csrf-protector-php/js/csrfprotector.js",
"jsUrl" => "http://192.168.99.100/vendor/owasp/csrf-protector-php/js/csrfprotector.js",
"jsUrl" => $GLOBALS['CONFIG']['base_url'] . "/vendor/owasp/csrf-protector-php/js/csrfprotector.js",
"tokenLength" => 10,
"disabledJavascriptMessage" => "This site attempts to protect users against <a href=\"https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29\">
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.
See details of your web browser for how to enable JavaScript.",
"verifyGetFor" => array()
);
);
3 changes: 3 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ functions.php - various utility functions
$GLOBALS['smarty']->assign('g_' . $key, $value);
}

include_once __DIR__ .'/vendor/owasp/csrf-protector-php/libs/csrf/csrfprotector.php';
csrfProtector::init();

include_once('classHeaders.php');
include_once('mimetypes.php');
require_once('crumb.php');
Expand Down
3 changes: 0 additions & 3 deletions odm-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@

require __DIR__ . '/vendor/autoload.php';

include_once __DIR__ .'/vendor/owasp/csrf-protector-php/libs/csrf/csrfprotector.php';
csrfProtector::init();

/**
* Set up the various view objects needed
* and add the templates/layouts
Expand Down

0 comments on commit 763dbf3

Please sign in to comment.