Fix incorrect regular expressions
This commit is contained in:
committed by
GitHub
parent
f0529e8446
commit
6fd9d6a4ca
@@ -61,8 +61,8 @@ 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('~\b../~', '', $folder);
|
||||
$folder = preg_replace('~\b./~', '', $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