jbonofre opened a new pull request, #2910:
URL: https://github.com/apache/karaf/pull/2910

   ## Summary
   Backport of #2892 to `karaf-4.4.x`.
   
   Note: #2892 is still open/unreviewed on `main` at the time of this backport, 
so this is not a cherry-pick — the same fix was applied directly against 
`karaf-4.4.x`, which has the identical vulnerable code.
   
   - `FeaturesPlugin`, `GogoPlugin`, `HttpPlugin` and `InstancePlugin` override 
`getResource()` and hand the request path directly to 
`classLoader.getResource()` with no restriction.
   - Felix's own `AbstractServlet.getResource()` (org.apache.felix.webconsole) 
only spools paths whose remainder starts with `/res/`; these four Karaf plugins 
dropped that check.
   - Restores the `/res/` prefix check in all four plugins so only each 
plugin's own bundled static resources (JS/CSS/images) can be served through 
this path, matching upstream Felix behavior.
   
   ## Test plan
   - [x] `mvn -pl 
webconsole/features,webconsole/gogo,webconsole/http,webconsole/instance -am 
compile` succeeds on `karaf-4.4.x`
   - [x] `mvn -pl 
webconsole/features,webconsole/gogo,webconsole/http,webconsole/instance test` 
succeeds on `karaf-4.4.x` (existing `InstancePluginTest` passes)
   - [ ] Manual verification that `/system/console/features/res/...`, 
`/system/console/gogo/res/...`, `/system/console/http/res/...`, 
`/system/console/instance/res/...` still resolve their JS/CSS/image resources 
correctly in a running instance


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