From 3b9173e74f552c10a6713b02112531edb2498b1f Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Thu, 19 Mar 2009 14:12:57 +0000 Subject: [PATCH] [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 --- .../proxy/DefaultRepositoryProxyConnectors.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- 2.39.5