Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.23.1
-
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); } }