mirror of
https://github.com/mrclay/minify.git
synced 2025-08-09 15:46:34 +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);
|
$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user