Fix UriComponentsBuilder.fromUriString parsing error
This commit fixes cases where part of the URI was mistaken for the
userinfo when:
* the URI did not contain any path
* the query string contained the "@"
Issue: SPR-11970
(cherry picked from commit a4484bb)
This commit is contained in:
committed by
Juergen Hoeller
parent
10a039000b
commit
a3a76d8c15
@@ -62,7 +62,7 @@ public class UriComponentsBuilder {
|
||||
|
||||
private static final String HTTP_PATTERN = "(?i)(http|https):";
|
||||
|
||||
private static final String USERINFO_PATTERN = "([^@/]*)";
|
||||
private static final String USERINFO_PATTERN = "([^@\\[/?#]*)";
|
||||
|
||||
private static final String HOST_IPV4_PATTERN = "[^\\[/?#:]*";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user