1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-08 23:26:43 +02:00

Merge pull request #9 from KendallHopkins/master

Protect replacement of "/../.." or "/./.." for "/" in ImportProcessor.
This commit is contained in:
Steve Clay
2011-10-28 12:39:37 -07:00

View File

@@ -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);
}
}