camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [camel] branch camel-2.22.x updated: CAMEL-12831: Camel-zipkin: useFallbackServiceNames leaks passwords
Date Mon, 24 Sep 2018 19:05:58 GMT
This is an automated email from the ASF dual-hosted git repository.

pascalschumacher pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.22.x by this push:
     new e7672d1  CAMEL-12831: Camel-zipkin: useFallbackServiceNames leaks passwords
e7672d1 is described below

commit e7672d10f9b55b49b5673a30ad339723a1f6308d
Author: Pascal Schumacher <pascalschumacher@gmx.net>
AuthorDate: Mon Sep 24 19:55:00 2018 +0200

    CAMEL-12831: Camel-zipkin: useFallbackServiceNames leaks passwords
---
 .../src/main/java/org/apache/camel/zipkin/ZipkinTracer.java       | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

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 2513f36..c7218d0 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
@@ -58,6 +58,7 @@ import org.apache.camel.util.EndpointHelper;
 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 zipkin2.reporter.AsyncReporter;
@@ -512,10 +513,11 @@ public class ZipkinTracer extends ServiceSupport implements RoutePolicyFactory,
                     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);


Mime
View raw message