mirror of
https://github.com/mrclay/minify.git
synced 2025-02-17 21:44:39 +01:00
Protect replacement of "/../.." or "/./.." for "/" during import.
This commit is contained in:
parent
82c9e00cc7
commit
dccfdaf599
@ -148,7 +148,7 @@ class Minify_ImportProcessor {
|
||||
$url = str_replace('/./', '/', $url);
|
||||
// inspired by patch from Oleg Cherniy
|
||||
do {
|
||||
$url = preg_replace('@/[^/]+/\\.\\./@', '/', $url, 1, $changed);
|
||||
$url = preg_replace('@/(?!\\.\\.?)[^/]+/\\.\\.@', '/', $url, 1, $changed);
|
||||
} while ($changed);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user