mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 00:14:40 +03:00
Encode the value of Mibew root according to RFC 3986
This commit is contained in:
parent
bf254a2604
commit
d819e20721
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user