* code for task #6510.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
/* Framework settings. */
|
||||
$config->framework->autoRepairTable = true;
|
||||
$config->framework->autoLang = false;
|
||||
$config->framework->filterCSRF = false;
|
||||
|
||||
/* Upload settings. */
|
||||
$config->allowedTags = '<p><span><h1><h2><h3><h4><h5><em><u><strong><br><ol><ul><li><img><a><b><font><hr><pre><div><table><td><th><tr><tbody><embed><style>';
|
||||
|
||||
@@ -595,9 +595,12 @@ class baseRouter
|
||||
unset($_REQUEST);
|
||||
|
||||
/* Change for CSRF. */
|
||||
$httpType = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http';
|
||||
$httpHost = $_SERVER['HTTP_HOST'];
|
||||
if((!defined('RUN_MODE') or RUN_MODE != 'api') and strpos($this->server->http_referer, "$httpType://$httpHost") !== 0) $_FILES = $_POST = array();
|
||||
if($this->config->framework->filterCSRF)
|
||||
{
|
||||
$httpType = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? 'https' : 'http';
|
||||
$httpHost = $_SERVER['HTTP_HOST'];
|
||||
if((!defined('RUN_MODE') or RUN_MODE != 'api') and strpos($this->server->http_referer, "$httpType://$httpHost") !== 0) $_FILES = $_POST = array();
|
||||
}
|
||||
|
||||
$_FILES = validater::filterFiles();
|
||||
$_POST = validater::filterSuper($_POST);
|
||||
|
||||
Reference in New Issue
Block a user