mirror of
https://github.com/mrclay/minify.git
synced 2025-02-20 06:54:37 +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);
|
$url = str_replace('/./', '/', $url);
|
||||||
// inspired by patch from Oleg Cherniy
|
// inspired by patch from Oleg Cherniy
|
||||||
do {
|
do {
|
||||||
$url = preg_replace('@/[^/]+/\\.\\./@', '/', $url, 1, $changed);
|
$url = preg_replace('@/(?!\\.\\.?)[^/]+/\\.\\.@', '/', $url, 1, $changed);
|
||||||
} while ($changed);
|
} while ($changed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user