You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2022/11/22 12:45:27 UTC

[GitHub] [sling-org-apache-sling-tooling-support-install] github-code-scanning[bot] commented on a diff in pull request #5: SLING-11693 Remove the jar installation feature

github-code-scanning[bot] commented on code in PR #5:
URL: https://github.com/apache/sling-org-apache-sling-tooling-support-install/pull/5#discussion_r1029283069


##########
src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java:
##########
@@ -89,89 +81,21 @@
             throws ServletException, IOException {
         final String dirPath = req.getParameter(DIR);
         final boolean refreshPackages = Boolean.parseBoolean(req.getParameter(dirPath));
-        boolean isMultipart = req.getContentType() != null && req.getContentType().toLowerCase().indexOf("multipart/form-data") > -1;
         try {
-            if (dirPath == null && !isMultipart) {
-                logger.error("No dir parameter specified : {} and no multipart content found", req.getParameterMap());
+            if (dirPath == null) {
+                logger.error("No dir parameter specified : {}", req.getParameterMap());

Review Comment:
   ## Logging should not be vulnerable to injection attacks
   
   <!--SONAR_ISSUE_KEY:AYSfXtSKy7mAZ9dHGpsh-->Change this code to not log user-controlled data. <p>See more on <a href="https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-tooling-support-install&issues=AYSfXtSKy7mAZ9dHGpsh&open=AYSfXtSKy7mAZ9dHGpsh&pullRequest=5">SonarCloud</a></p>
   
   [Show more details](https://github.com/apache/sling-org-apache-sling-tooling-support-install/security/code-scanning/24)



-- 
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: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org