Problem
I'm using Spring Boot 2.2.9. The change introduced by #19999 considers any keys contains "uri", "uris", "address" or "addresses" are "comma separated URLs". This is not always the right assumption. It will try to remove password from those URLs, however if it's not a URL format, it will return the original content.
Expected Behavior
If that key is not a URL format, it should return as ******. Or at least allow developers to configure whether they want sanitize URLs or not.
Reproducer
Sanitizer sanitizer = new Sanitizer();
System.out.println(sanitizer.sanitize("uris", "[amqp://foo:bar@host/]"));
System.out.println(sanitizer.sanitize("uris", "amqp://foo:bar@host/"));The output is:
[amqp://foo:bar@host/]
amqp://foo:******@host/