diff options
author | Brett Porter <brett@apache.org> | 2009-03-19 14:12:57 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2009-03-19 14:12:57 +0000 |
commit | 3b9173e74f552c10a6713b02112531edb2498b1f (patch) | |
tree | d49efee2d19758426de1fb9380ae2c6d0f3cd00b /archiva-modules/archiva-base | |
parent | 9b150136fef9fc8c4eb6aa68aca7ca817f5f1740 (diff) | |
download | archiva-3b9173e74f552c10a6713b02112531edb2498b1f.tar.gz archiva-3b9173e74f552c10a6713b02112531edb2498b1f.zip |
[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
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r-- | archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultRepositoryProxyConnectors.java | 10 |
1 files changed, 10 insertions, 0 deletions
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; |