From: Brett Porter Date: Thu, 19 Mar 2009 14:12:57 +0000 (+0000) Subject: [MRM-1147] handling leading / on whitelists is ambiguous X-Git-Tag: archiva-1.2~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b9173e74f552c10a6713b02112531edb2498b1f;p=archiva.git [MRM-1147] handling leading / on whitelists is ambiguous git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@756012 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java index 8a09013c1..fa7799e30 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -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;