From dccfdaf599781a61e0b14f951b999db3b815a782 Mon Sep 17 00:00:00 2001 From: Kendall Hopkins Date: Thu, 27 Oct 2011 19:36:54 -0400 Subject: [PATCH] Protect replacement of "/../.." or "/./.." for "/" during import. --- min/lib/Minify/ImportProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/min/lib/Minify/ImportProcessor.php b/min/lib/Minify/ImportProcessor.php index 0d6d90a..10d9a09 100644 --- a/min/lib/Minify/ImportProcessor.php +++ b/min/lib/Minify/ImportProcessor.php @@ -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); } }