|
|
@ -73,6 +73,14 @@ class SanitizerTests {
|
|
|
|
.isEqualTo("http://user:******@localhost:8080");
|
|
|
|
.isEqualTo("http://user:******@localhost:8080");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest(name = "key = {0}")
|
|
|
|
|
|
|
|
@MethodSource("matchingUriUserInfoKeys")
|
|
|
|
|
|
|
|
void uriWithNonAlphaSchemeCharactersAndSingleValueWithPasswordShouldBeSanitized(String key) {
|
|
|
|
|
|
|
|
Sanitizer sanitizer = new Sanitizer();
|
|
|
|
|
|
|
|
assertThat(sanitizer.sanitize(key, "s-ch3m.+-e://user:password@localhost:8080"))
|
|
|
|
|
|
|
|
.isEqualTo("s-ch3m.+-e://user:******@localhost:8080");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest(name = "key = {0}")
|
|
|
|
@ParameterizedTest(name = "key = {0}")
|
|
|
|
@MethodSource("matchingUriUserInfoKeys")
|
|
|
|
@MethodSource("matchingUriUserInfoKeys")
|
|
|
|
void uriWithSingleValueWithNoPasswordShouldNotBeSanitized(String key) {
|
|
|
|
void uriWithSingleValueWithNoPasswordShouldNotBeSanitized(String key) {
|
|
|
|