Skip to content

Commit 2c3a1ac

Browse files
author
TheSnoozer
committed
#519: add a test that ensures that already password encoded (correct) URLs get stripped of their credentials
1 parent 7fdcd4b commit 2c3a1ac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

maven/src/test/java/pl/project13/core/UriUserInfoRemoverTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public static Collection<Object[]> parameters() {
5252
{ "file:///path/to/repo.git/", "file:///path/to/repo.git/"},
5353
{ "file:///C:\\Users\\test\\example", "file:///C:\\Users\\test\\example"},
5454
{ "file://C:\\Users\\test\\example", "file://C:\\Users\\test\\example" },
55+
// ensure a percent encoded password is stripped too, that should be allowed
56+
{ "https://user:passw%40rd@example.com:8888", "https://user@example.com:8888" },
5557
// Must Support: use of 'unreserved' characters as https://www.ietf.org/rfc/rfc2396.txt, Section "2.3. Unreserved Characters"
5658
{ "https://user:A-_.!~*'()Z@example.com:8888", "https://user@example.com:8888" },
5759
// Optional Support: use of 'reserved' characters as https://www.ietf.org/rfc/rfc2396.txt, Section "2.2. Reserved Characters"

0 commit comments

Comments
 (0)