Skip to content

Commit

Permalink
Merge pull request #12208 from jetty/jetty-12.0.x-11434-AliasCheckerS…
Browse files Browse the repository at this point in the history
…ymlinkTests

Issue #11434 - resolve differences in AliasCheckerSymlinkTests
  • Loading branch information
lachlan-roberts authored Sep 3, 2024
2 parents 551710e + 4164ab7 commit 899c005
Show file tree
Hide file tree
Showing 20 changed files with 393 additions and 534 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,12 @@ public boolean handle(Request request, Response response, Callback callback) thr

protected boolean handleByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
{
if (isProtectedTarget(pathInContext))
{
Response.writeError(request, response, callback, HttpStatus.NOT_FOUND_404, null);
return true;
}

return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
import jakarta.servlet.descriptor.TaglibDescriptor;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSessionActivationListener;
import jakarta.servlet.http.HttpSessionAttributeListener;
import jakarta.servlet.http.HttpSessionBindingListener;
Expand Down Expand Up @@ -1191,12 +1190,8 @@ protected ContextResponse wrapResponse(ContextRequest request, Response response
protected boolean handleByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
{
boolean initialDispatch = request instanceof ServletContextRequest;
if (initialDispatch && isProtectedTarget(pathInContext))
{
Response.writeError(request, response, callback, HttpServletResponse.SC_NOT_FOUND, null);
return true;
}

if (!initialDispatch)
return false;
return super.handleByContextHandler(pathInContext, request, response, callback);
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 899c005

Please sign in to comment.