mirror of
https://github.com/mrclay/minify.git
synced 2025-08-09 07:36:56 +02:00
Merge pull request #9 from KendallHopkins/master
Protect replacement of "/../.." or "/./.." for "/" in ImportProcessor.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user