[
https://issues.apache.org/jira/browse/CAMEL-12831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16626281#comment-16626281
]
ASF GitHub Bot commented on CAMEL-12831:
----------------------------------------
PascalSchumacher closed pull request #2531: CAMEL-12831: Camel-zipkin:
useFallbackServiceNames leaks passwords
URL: https://github.com/apache/camel/pull/2531
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java
b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java
index f069c782e41..7314a5dfffa 100644
---
a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java
+++
b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java
@@ -61,6 +61,7 @@
import org.apache.camel.util.IOHelper;
import org.apache.camel.util.ObjectHelper;
import org.apache.camel.util.ServiceHelper;
+import org.apache.camel.util.URISupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
@@ -516,10 +517,11 @@ private String getServiceName(Exchange exchange, Endpoint
endpoint, Map<String,
return null;
}
}
- if (LOG.isTraceEnabled() && key != null) {
- LOG.trace("Using serviceName: {} as fallback", key);
+ String sanitizedKey = URISupport.sanitizeUri(key);
+ if (LOG.isTraceEnabled() && sanitizedKey != null) {
+ LOG.trace("Using serviceName: {} as fallback", sanitizedKey);
}
- return key;
+ return sanitizedKey;
} else {
if (LOG.isTraceEnabled() && answer != null) {
LOG.trace("Using serviceName: {}", answer);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Camel-zipkin: useFallbackServiceNames leaks passwords
> -----------------------------------------------------
>
> Key: CAMEL-12831
> URL: https://issues.apache.org/jira/browse/CAMEL-12831
> Project: Camel
> Issue Type: Bug
> Components: camel-zipkin
> Affects Versions: 2.22.1
> Reporter: Pascal Schumacher
> Priority: Major
>
> If you do not define service names and useFallbackServiceNames is true (the
> default setting) camel uses endpoints URIs as services names.
> Passwords in these URIs are not masked and therefore visible in Zipkin traces.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)