Skip to content
Permalink
Browse files

fix(init.php): review path detection

  • Loading branch information...
papakai committed Mar 14, 2019
1 parent 6ba9907 commit 4cd6e6b64369b042afa78a3714278a9b3dbc798d
Showing with 3 additions and 1 deletion.
  1. +3 −1 controller/backend.pricing.php
@@ -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 {

0 comments on commit 4cd6e6b

Please sign in to comment.
You can’t perform that action at this time.