Test of a security fix backport.
This commit is contained in:
parent
7ce20a5ff3
commit
7201222753
1 changed files with 6 additions and 0 deletions
|
|
@ -180,6 +180,9 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage,
|
|||
$tplcontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {\n";
|
||||
$tplcontent .= ' $pathdepth = count(explode(\'/\', $_SERVER[\'SCRIPT_NAME\'])) - 2;'."\n";
|
||||
$tplcontent .= ' require_once ($pathdepth ? str_repeat(\'../\', $pathdepth) : \'./\').\'master.inc.php\';'."\n";
|
||||
if (getDolGlobalString("MAIN_ADD_WAF_V22") && empty($objectpage->disable_waf)) {
|
||||
$tplcontent .= ' require_once DOL_DOCUMENT_ROOT.\'/waf.inc.php\';'."\n";
|
||||
}
|
||||
$tplcontent .= "} // Not already loaded\n";
|
||||
$tplcontent .= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n";
|
||||
$tplcontent .= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
|
||||
|
|
@ -370,6 +373,9 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage,
|
|||
$tplcontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {\n";
|
||||
$tplcontent .= ' $pathdepth = count(explode(\'/\', $_SERVER[\'SCRIPT_NAME\'])) - 2;'."\n";
|
||||
$tplcontent .= ' require_once ($pathdepth ? str_repeat(\'../\', $pathdepth) : \'./\').\'master.inc.php\';'."\n";
|
||||
if (getDolGlobalString("MAIN_ADD_WAF_V22") && empty($objectpage->disable_waf)) {
|
||||
$tplcontent .= ' require_once DOL_DOCUMENT_ROOT.\'/waf.inc.php\';'."\n";
|
||||
}
|
||||
$tplcontent .= "} // Not already loaded\n";
|
||||
$tplcontent .= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n";
|
||||
$tplcontent .= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
|
||||
|
|
|
|||
Loading…
Reference in a new issue