CptBartender commented on code in PR #2892:
URL: https://github.com/apache/karaf/pull/2892#discussion_r4020641196


##########
webconsole/gogo/src/main/java/org/apache/karaf/webconsole/gogo/GogoPlugin.java:
##########
@@ -97,7 +97,7 @@ public void renderContent(HttpServletRequest request, 
HttpServletResponse respon
     @Override
     protected URL getResource(String path) {
         path = path.substring(NAME.length() + 1);
-        if (path == null || path.isEmpty()) {
+        if (path == null || path.isEmpty() || !path.startsWith("/res/")) {

Review Comment:
   `path == null` nullcheck might be superfluous, as the `String#substring` 
call above would either throw an NPE if `path` is `null`, or return a valid 
(potentially empty) string.



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