github-advanced-security[bot] commented on code in PR #29:
URL:
https://github.com/apache/sling-org-apache-sling-servlets-post/pull/29#discussion_r2018866983
##########
src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java:
##########
@@ -419,7 +449,10 @@
URI redirectUri = new URI(result);
if (redirectUri.getAuthority() != null) {
// if it has a host information
- log.warn("redirect target ({}) does include host
information ({}). This is not allowed for security reasons!", result,
redirectUri.getAuthority());
+ log.warn(
+ "redirect target ({}) does include host
information ({}). This is not allowed for security reasons!",
+ result,
+ redirectUri.getAuthority());
Review Comment:
## Logging should not be vulnerable to injection attacks
<!--SONAR_ISSUE_KEY:AZXdUYoqS-wInDwB7j8O-->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-servlets-post&issues=AZXdUYoqS-wInDwB7j8O&open=AZXdUYoqS-wInDwB7j8O&pullRequest=29">SonarQube
Cloud</a></p>
[Show more
details](https://github.com/apache/sling-org-apache-sling-servlets-post/security/code-scanning/19)
--
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]