Skip to content

Missing sanitization in lists of URIs properties on actuator endpoints #23037

@crmky

Description

@crmky

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/

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions