]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1147] handling leading / on whitelists is ambiguous
authorBrett Porter <brett@apache.org>
Thu, 19 Mar 2009 14:12:57 +0000 (14:12 +0000)
committerBrett Porter <brett@apache.org>
Thu, 19 Mar 2009 14:12:57 +0000 (14:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@756012 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java

index 8a09013c150ab0a11427368debb176f1dd05330e..fa7799e30483eb4a14de0abb9e644d55ea67ccf5 100644 (file)
@@ -958,8 +958,18 @@ public class DefaultRepositoryProxyConnectors
             return false;
         }
 
+        if ( !path.startsWith( "/" ) )
+        {
+            path = "/" + path;
+        }
+        
         for ( String pattern : patterns )
         {
+            if ( !pattern.startsWith( "/" ) )
+            {
+                pattern = "/" + pattern;
+            }
+            
             if ( SelectorUtils.matchPath( pattern, path, false ) )
             {
                 return true;