Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.0
-
None
-
None
Description
UrlValidator does not accept userinfo without ":".
The following code returns false.
UrlValidator validator = new UrlValidator(); validator.isValid("http://user@www.apache.org:80/path")
But it should be accepted.
RFC of URI allows userinfo without colon.
https://tools.ietf.org/html/rfc3986#section-3.2.1
userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
RFC of URL also allows it.
https://tools.ietf.org/html/rfc1738#section-3.1
//<user>:<password>@<host>:<port>/<url-path>
Some or all of the parts "<user>:<password>@", ":<password>",
":<port>", and "/<url-path>" may be excluded.
I created Pull Request.
https://github.com/apache/commons-validator/pull/5
Attachments
Issue Links
- links to