Merge pull request #976 from boxbilling/csrf-fix

Fixing CSRF protector
This commit is contained in:
Yağızhan authored and GitHub committed 2021-08-14 07:24:30 +00:00
commit 08f5ab1aee
2 files changed
+6 -5

No files matched your search

+5 -4
View File
@@ -257,10 +257,6 @@ if(file_exists($configPath) && 0 !== filesize($configPath) && file_exists(BB_PAT
$config = require_once $configPath;
require BB_PATH_VENDOR . '/autoload.php';
include_once BB_PATH_LIBRARY .'/Security/CSRF-Protector-PHP/libs/csrf/csrfprotector.php';
// Initialize CSRFProtector library
csrfProtector::init();
date_default_timezone_set($config['timezone']);
@@ -277,6 +273,11 @@ if($config['sef_urls']) {
define('BB_URL_API', $config['url'] . 'index.php?_url=/api/');
}
include_once BB_PATH_LIBRARY .'/Security/CSRF-Protector-PHP/libs/csrf/csrfprotector.php';
// Initialize CSRFProtector library
csrfProtector::init();
if($config['debug']) {
error_reporting(E_ALL);
ini_set('display_errors', '1');
+1 -1
View File
@@ -13,7 +13,7 @@ return array(
"POST" => 0),
"errorRedirectionPage" => "",
"customErrorMessage" => "",
"jsUrl" => $config['url'] .'/bb-library/Security/CSRF-Protector-PHP/js/csrfprotector.js',
"jsUrl" => BB_URL .'/bb-library/Security/CSRF-Protector-PHP/js/csrfprotector.js',
"tokenLength" => 10,
"cookieConfig" => array(
"path" => '',