You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/09/30 07:42:53 UTC
[camel] 01/04: CAMEL-13820: ResolveEndpointFailedException should
mask sensitive information in uri
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit ebe394bd43101f379c6621a6116fca9315344b49
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Sep 30 09:01:08 2019 +0200
CAMEL-13820: ResolveEndpointFailedException should mask sensitive information in uri
---
.../java/org/apache/camel/ResolveEndpointFailedException.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/core/camel-api/src/main/java/org/apache/camel/ResolveEndpointFailedException.java b/core/camel-api/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
index ed0915b..051a79b 100644
--- a/core/camel-api/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
+++ b/core/camel-api/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel;
+import static org.apache.camel.util.URISupport.sanitizeUri;
+
/**
* A runtime exception thrown if an {@link Endpoint} cannot be resolved via URI
*/
@@ -24,17 +26,17 @@ public class ResolveEndpointFailedException extends RuntimeCamelException {
private final String uri;
public ResolveEndpointFailedException(String uri, Throwable cause) {
- super("Failed to resolve endpoint: " + uri + " due to: " + cause.getMessage(), cause);
+ super("Failed to resolve endpoint: " + sanitizeUri(uri) + " due to: " + cause.getMessage(), cause);
this.uri = uri;
}
public ResolveEndpointFailedException(String uri, String message) {
- super("Failed to resolve endpoint: " + uri + " due to: " + message);
+ super("Failed to resolve endpoint: " + sanitizeUri(uri) + " due to: " + message);
this.uri = uri;
}
public ResolveEndpointFailedException(String uri) {
- super("Failed to resolve endpoint: " + uri);
+ super("Failed to resolve endpoint: " + sanitizeUri(uri));
this.uri = uri;
}