mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
More explicitly exclude a series of double dots
This commit is contained in:
parent
ff0df0a14b
commit
b088348be2
1 changed files with 1 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ class FilenameFilter
|
|||
$path = preg_replace('@/(\./)+@', '/', $path);
|
||||
|
||||
// Remove double dots and the preceding directory.
|
||||
while (preg_match('@/[^/]+/\.\.(?:/|$)@', $path, $matches))
|
||||
while (preg_match('@/(?!\.\.)[^/]+/\.\.(?:/|$)@', $path, $matches))
|
||||
{
|
||||
$path = str_replace($matches[0], '/', $path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue