yuqi1129 opened a new pull request, #11034:
URL: https://github.com/apache/gravitino/pull/11034

   ### What changes were proposed in this pull request?
   
   Add a null guard for `HttpServletRequest#getRequestURI()` in `WebUIFilter`. 
When the request URI is null, the filter now passes the request through the 
filter chain instead of trying to rewrite it to a Web UI static resource.
   
   This PR also adds a unit test covering the null URI path.
   
   ### Why are the changes needed?
   
   `WebUIFilter` previously called `path.lastIndexOf("/")` without checking 
whether `path` was null. If `getRequestURI()` returned null, the request failed 
with a `NullPointerException` and Jetty returned 500.
   
   Fix: #11029
   
   ### Does this PR introduce _any_ user-facing change?
   
   No API or configuration changes. Malformed or proxy-affected requests with a 
null request URI no longer fail in `WebUIFilter` with an NPE.
   
   ### How was this patch tested?
   
   ```bash
   ./gradlew :server:spotlessApply
   ./gradlew :server:test --tests 
org.apache.gravitino.server.web.ui.WebUIFilterTest -PskipITs
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to