-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request getPathInfo returns null #4577
Comments
This reverts commit edb5196.
@gregw since |
I think the idea was that if the access handler is installed outside of a context, then it will match paths on the entire URI. If it is installed within a context, it will match paths against the URI stripped of the contextPath. However, in this case the servlet path has also been taken from the pathInfo, leaving null. So ideally we'd like to apply the path match before the servletHandler does. So perhaps it needs to be a ScopedHandler.... or operate on |
Signed-off-by: liudonghua123 <[email protected]>
Fixes and tests #4577 IPAccessHandler in context by using target instead of pathInfo for path matching. Signed-off-by: Greg Wilkins <[email protected]>
Updates from review. Signed-off-by: Greg Wilkins <[email protected]>
yes |
Match on full URI path rather than target. Signed-off-by: Greg Wilkins <[email protected]>
* Fixes #4577 IPAccessHandler in context Fixes and tests #4577 IPAccessHandler in context by using target instead of pathInfo for path matching. Signed-off-by: Greg Wilkins <[email protected]> * Tests #4577 IPAccessHandler target Updates from review. Signed-off-by: Greg Wilkins <[email protected]> * Issue #4577 IpAccessHandler NPE Match on full URI path rather than target. Signed-off-by: Greg Wilkins <[email protected]>
Signed-off-by: Lachlan Roberts <[email protected]>
…dler_getPathInfo Issue #4577 - request getPathInfo() could be null in InetAccessHandler
Jetty version
9.4.26.v20200117
Java version
1.8.0_191
OS type/version
Windows 10 1909
Description
I use IPAccessHandler for restricting ip and url access. My config file is something like belows.
But when I browser http://127.0.0.1:8080/auditlog/, it always give me 403 error. After go through the code, I find it was
baseRequest.getPathInfo()
returned null instead of/auditlog/
, so the validator logic failed.The text was updated successfully, but these errors were encountered: