mirror of
https://github.com/Mibew/mibew.git
synced 2025-03-03 18:38:31 +03:00
Sanitize mibewroot value
This commit is contained in:
parent
24f1a64fca
commit
0fc7477672
@ -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');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user