Sanitize mibewroot value

This commit is contained in:
Fedor A. Fetisov 2013-10-28 15:51:11 +04:00
parent 24f1a64fca
commit 0fc7477672

View File

@ -24,6 +24,9 @@ session_start();
// Include configuration file
require_once(dirname(__FILE__).'/config.php');
// Sanitize path to application and remove extra slashes
$mibewroot = join("/", array_map("urlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot)))));
// Include system constants file
require_once(dirname(__FILE__).'/common/constants.php');