Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
fix(init.php): review path detection
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSchwarz-cnic committed Mar 14, 2019
1 parent 6ba9907 commit 4cd6e6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controller/backend.pricing.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
$root_path .= $script_path;
}
$init_path = implode(DIRECTORY_SEPARATOR, array($root_path,"init.php"));
$init_path = preg_replace("/(\/|\\\)" . $GLOBALS["customadminpath"] . "(\/|\\\)init.php$/", DIRECTORY_SEPARATOR . "init.php", $init_path);
if (isset($GLOBALS["customadminpath"])) {
$init_path = preg_replace("/(\/|\\\)" . $GLOBALS["customadminpath"] . "(\/|\\\)init.php$/", DIRECTORY_SEPARATOR . "init.php", $init_path);
}
if (file_exists($init_path)) {
require_once($init_path);
} else {
Expand Down

0 comments on commit 4cd6e6b

Please sign in to comment.