Skip to content

Commit

Permalink
Issue #6497 - aliasChecker with no baseResource should always denies …
Browse files Browse the repository at this point in the history
…aliases

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Jul 30, 2021
1 parent 32bff77 commit bf078be
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -76,9 +76,6 @@ protected Path getBasePath()
protected void doStart() throws Exception
{
_basePath = getPath(_contextHandler.getBaseResource());
if (_basePath == null)
throw new IllegalStateException("Could not obtain base resource path");

String[] protectedTargets = _contextHandler.getProtectedTargets();
if (protectedTargets != null)
{
Expand All @@ -99,6 +96,9 @@ protected void doStop() throws Exception
@Override
public boolean check(String uri, Resource resource)
{
if (_basePath == null)
return false;

// The existence check resolves the symlinks.
if (!resource.exists())
return false;
Expand Down

0 comments on commit bf078be

Please sign in to comment.