Improve effectiveness of regular expressions
This commit is contained in:
committed by
GitHub
parent
6fd9d6a4ca
commit
037e4b8386
@@ -61,8 +61,7 @@ class PicoSearch extends AbstractPicoPlugin
|
||||
// as a safeguard to make sure nothing slips through the cracks.
|
||||
if ($this->search_area) {
|
||||
$folder = str_replace('\\', '/', $this->search_area);
|
||||
$folder = preg_replace('~\.\./~', '', $folder);
|
||||
$folder = preg_replace('~\./~', '', $folder);
|
||||
$folder = preg_replace('~\.+/~', '', $folder);
|
||||
}
|
||||
|
||||
$temp_file = $pico->getConfig('content_dir') . ($folder ?: '') . 'search' . $pico->getConfig('content_ext');
|
||||
|
||||
Reference in New Issue
Block a user