Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13191

URISupport sanitizeUri don't hide complete password if password contains colon

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.23.1
    • 2.23.2, 2.24.0, 2.22.4, 3.0.0
    • camel-core
    • None
    • Unknown

    Description

      sanitizedUri don't hide the complete password if the password contains a colon.

      e.g.

      camel route URI is "sftp://user:hidden:password@target.test" where the password is "hidden:password" 

      the sanitizedUri method will only hide the last part of password (sftp://user:hidden:xxxxxx@target.test)

      UnitTest
      import org.apache.camel.util.URISupport;
      import org.junit.jupiter.api.Assertions;
      import org.junit.jupiter.api.Test;
      
      class UriSupportTest {
      
        @Test
        void testURISanitizeUri() {
          var sanitizedUri = URISupport.sanitizeUri("sftp://user:hidden:Password@target.test");
          Assertions.assertEquals("sftp://user:xxxxxx@target.test", sanitizedUri);
        }
      
      }
      
      

       

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            Pieczewski Christian Pieczewski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m