1
0
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:
Kendall Hopkins 2011-10-27 19:36:54 -04:00
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);
}
}