[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
This commit is contained in:
Brett Porter 2009-03-19 14:12:57 +00:00
parent 9b150136fe
commit 3b9173e74f
1 changed files with 10 additions and 0 deletions

View 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;