github-advanced-security[bot] commented on code in PR #161:
URL:
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/161#discussion_r2015960665
##########
src/main/java/org/apache/sling/resourceresolver/impl/mapping/ResourceMapperImpl.java:
##########
@@ -373,11 +373,14 @@
}
private RequestContext(javax.servlet.http.HttpServletRequest request,
String resourcePath) {
- if ( request != null ) {
+ if (request != null) {
this.uri = MapEntry.getURI(request.getScheme(),
request.getServerName(), request.getServerPort(), "/");
this.schemeWithPrefix = request.getScheme().concat("://");
- logger.debug("map: Mapping path {} for {} (at least with
scheme prefix {})", resourcePath,
- uri, schemeWithPrefix );
+ logger.debug(
+ "map: Mapping path {} for {} (at least with scheme
prefix {})",
+ resourcePath,
+ uri,
+ schemeWithPrefix);
Review Comment:
## Logging should not be vulnerable to injection attacks
<!--SONAR_ISSUE_KEY:AZXWwi-jM8Z2qvzIy91e-->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-resourceresolver&issues=AZXWwi-jM8Z2qvzIy91e&open=AZXWwi-jM8Z2qvzIy91e&pullRequest=161">SonarQube
Cloud</a></p>
[Show more
details](https://github.com/apache/sling-org-apache-sling-resourceresolver/security/code-scanning/21)
--
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]