better use stripos for system32 path excludes
References 325de34183499bac7517b7226c7f1996fdad18ae
This commit is contained in:
parent
325de34183
commit
6d7e2f44a3
@ -234,10 +234,10 @@ function serendipity_query_default($optname, $default, $usertemplate = false, $t
|
||||
if (isset($_SERVER['PATH'])) {
|
||||
$path = array_merge($path, explode(PATH_SEPARATOR, $_SERVER['PATH']));
|
||||
// remove unwanted empty or system32 path parts, so that wrong system32/convert.exe is prevented.
|
||||
foreach ($path as $pk => $pv) {
|
||||
if (strtolower($pv) == 'system32' || empty($pv)) {
|
||||
unset($path[$pk]);
|
||||
}
|
||||
foreach ($path as $pk => $pv) {
|
||||
if (stripos($pv, 'system32') !== false || empty($pv)) {
|
||||
unset($path[$pk]);
|
||||
}
|
||||
}
|
||||
$path = array_values($path); // 'reindex' array
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user