You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "enapps-enorman (via GitHub)" <gi...@apache.org> on 2025/11/29 00:45:00 UTC

[PR] SLING-13017 Update to Parent 63 [sling-org-apache-sling-serviceuser-webconsole]

enapps-enorman opened a new pull request, #11:
URL: https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/pull/11

   Update to the latest parent and related refactoring
   
   Also bump the minimum java version to 17


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


Re: [PR] SLING-13017 Update to Parent 63 [sling-org-apache-sling-serviceuser-webconsole]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #11:
URL: https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/pull/11#issuecomment-3590757873

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11)
   
   


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


Re: [PR] SLING-13017 Update to Parent 63 [sling-org-apache-sling-serviceuser-webconsole]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #11:
URL: https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/pull/11#issuecomment-3593363690

   ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11) **Quality Gate failed**  
   Failed conditions  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [B Security Rating on New Code](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11) (required ≥ A)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11)
   
   ##   
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png '') Catch issues before they fail your Quality Gate with our IDE extension ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png '') [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)
   
   


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


Re: [PR] SLING-13017 Update to Parent 65 [sling-org-apache-sling-serviceuser-webconsole]

Posted by "enapps-enorman (via GitHub)" <gi...@apache.org>.
enapps-enorman merged PR #11:
URL: https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/pull/11


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


Re: [PR] SLING-13017 Update to Parent 63 [sling-org-apache-sling-serviceuser-webconsole]

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #11:
URL: https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/pull/11#discussion_r2574831425


##########
src/main/java/org/apache/sling/serviceuser/webconsole/impl/ServiceUserWebConsolePlugin.java:
##########
@@ -553,16 +554,28 @@
 
     private List<Pair<String, String>> getPrivileges(HttpServletRequest request) {
         List<Pair<String, String>> privileges = new ArrayList<>();
-        List<String> params = Collections.list(request.getParameterNames());
+
+        List<String> params = new ArrayList<>();
+        // filter the parameter names
+        Enumeration<String> parameterNames = request.getParameterNames();
+        while (parameterNames.hasMoreElements()) {
+            String paramName = parameterNames.nextElement();
+            if (paramName.startsWith("acl-path-")) {
+                params.add(paramName);
+            }
+        }
 
         for (String param : params) {
-            if (param.startsWith("acl-path-")) {
-                String path = request.getParameter(param);
-                String privilege = request.getParameter(param.replace("-path-", "-privilege-"));
-                if (StringUtils.isNotBlank(path) && StringUtils.isNotBlank(privilege)) {
-                    privileges.add(new ImmutablePair<>(path, privilege));
+            String path = request.getParameter(param);
+            if (StringUtils.isEmpty(path)) {
+                log.warn("Unable to load ACL due to missing value for parameter {}", param);

Review Comment:
   ## Logging should not be vulnerable to injection attacks
   
   <!--SONAR_ISSUE_KEY:AZrWjBx7xbkIUrDe2Uvs-->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-serviceuser-webconsole&issues=AZrWjBx7xbkIUrDe2Uvs&open=AZrWjBx7xbkIUrDe2Uvs&pullRequest=11">SonarQube Cloud</a></p>
   
   [Show more details](https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/security/code-scanning/11)



##########
src/main/java/org/apache/sling/serviceuser/webconsole/impl/ServiceUserWebConsolePlugin.java:
##########
@@ -553,16 +554,28 @@
 
     private List<Pair<String, String>> getPrivileges(HttpServletRequest request) {
         List<Pair<String, String>> privileges = new ArrayList<>();
-        List<String> params = Collections.list(request.getParameterNames());
+
+        List<String> params = new ArrayList<>();
+        // filter the parameter names
+        Enumeration<String> parameterNames = request.getParameterNames();
+        while (parameterNames.hasMoreElements()) {
+            String paramName = parameterNames.nextElement();
+            if (paramName.startsWith("acl-path-")) {
+                params.add(paramName);
+            }
+        }
 
         for (String param : params) {
-            if (param.startsWith("acl-path-")) {
-                String path = request.getParameter(param);
-                String privilege = request.getParameter(param.replace("-path-", "-privilege-"));
-                if (StringUtils.isNotBlank(path) && StringUtils.isNotBlank(privilege)) {
-                    privileges.add(new ImmutablePair<>(path, privilege));
+            String path = request.getParameter(param);
+            if (StringUtils.isEmpty(path)) {
+                log.warn("Unable to load ACL due to missing value for parameter {}", param);
+            } else {
+                String privilegeParam = param.replace("-path-", "-privilege-");
+                String privilege = request.getParameter(privilegeParam);
+                if (StringUtils.isEmpty(privilege)) {
+                    log.warn("Unable to load ACL due to missing value for parameter {}", privilegeParam);

Review Comment:
   ## Logging should not be vulnerable to injection attacks
   
   <!--SONAR_ISSUE_KEY:AZrWjBx7xbkIUrDe2Uvr-->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-serviceuser-webconsole&issues=AZrWjBx7xbkIUrDe2Uvr&open=AZrWjBx7xbkIUrDe2Uvr&pullRequest=11">SonarQube Cloud</a></p>
   
   [Show more details](https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/security/code-scanning/10)



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


Re: [PR] SLING-13017 Update to Parent 63 [sling-org-apache-sling-serviceuser-webconsole]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #11:
URL: https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/pull/11#issuecomment-3593473419

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11)
   
   


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


Re: [PR] SLING-13017 Update to Parent 65 [sling-org-apache-sling-serviceuser-webconsole]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #11:
URL: https://github.com/apache/sling-org-apache-sling-serviceuser-webconsole/pull/11#issuecomment-3820848590

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_sling-org-apache-sling-serviceuser-webconsole&pullRequest=11)
   
   


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