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 11:32:59 UTC

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

ppalaga opened a new pull request #5078:
URL: https://github.com/apache/camel/pull/5078


   …guration summary
   
   https://issues.apache.org/jira/browse/CAMEL-16190


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



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

Posted by GitBox <gi...@apache.org>.
davsclaus commented on a change in pull request #5078:
URL: https://github.com/apache/camel/pull/5078#discussion_r575185873



##########
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:
       Ah nice catch. Just a note that if the text ends with a dot, then you get a out of bounds exception.
   Though it doesnt make sense to have keys that ends with a dot, but maybe an user make a typo




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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [camel] davsclaus merged pull request #5078: CAMEL-16190 Sensitive configuration values not redacted in Auto-confi…

Posted by GitBox <gi...@apache.org>.
davsclaus merged pull request #5078:
URL: https://github.com/apache/camel/pull/5078


   


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