You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/02/12 13:14:33 UTC

[GitHub] [camel] ppalaga commented on a change in pull request #5078: CAMEL-16190 Sensitive configuration values not redacted in Auto-confi…

ppalaga commented on a change in pull request #5078:
URL: https://github.com/apache/camel/pull/5078#discussion_r575213941



##########
File path: core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java
##########
@@ -95,6 +95,10 @@ private SensitiveUtils() {
     }
 
     public static boolean containsSensitive(String text) {
+        int lastPeriod = text.lastIndexOf('.');
+        if (lastPeriod >= 0) {
+            text = text.substring(lastPeriod + 1);

Review comment:
       No, `text.substring(text.length)` always returns an empty string.
   I have added a test for a key ending with period in 8ade525 `assertFalse(SensitiveUtils.containsSensitive("foo.bar.accessKey."));` to make sure that it works as expected.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org