Encode the value of Mibew root according to RFC 3986

This commit is contained in:
Fedor A. Fetisov 2014-03-24 03:07:32 +04:00
parent bf254a2604
commit d819e20721

View File

@ -24,7 +24,7 @@ if (isset($use_open_basedir_protection) && $use_open_basedir_protection) {
} }
// Sanitize path to application and remove extra slashes // Sanitize path to application and remove extra slashes
$mibewroot = join("/", array_map("urlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot))))); $mibewroot = join("/", array_map("rawurlencode", preg_split('/\//', preg_replace('/\/+$/', '', preg_replace('/\/{2,}/', '/', '/' . $mibewroot)))));
// Sanitize database tables prefix // Sanitize database tables prefix
$mysqlprefix = preg_replace('/[^A-Za-z0-9_$]/', '', $mysqlprefix); $mysqlprefix = preg_replace('/[^A-Za-z0-9_$]/', '', $mysqlprefix);