You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Shumpei Akai (JIRA)" <ji...@apache.org> on 2016/01/28 08:00:47 UTC
[jira] [Created] (VALIDATOR-387) Userinfo without colon should be
valid in UrlValidator
Shumpei Akai created VALIDATOR-387:
--------------------------------------
Summary: Userinfo without colon should be valid in UrlValidator
Key: VALIDATOR-387
URL: https://issues.apache.org/jira/browse/VALIDATOR-387
Project: Commons Validator
Issue Type: Bug
Affects Versions: 1.5.0
Reporter: Shumpei Akai
UrlValidator does not accept userinfo without ":".
The following code returns false.
{code}
UrlValidator validator = new UrlValidator();
validator.isValid("http://user@www.apache.org:80/path")
{code}
But it should be accepted.
RFC of URI allows userinfo without colon.
https://tools.ietf.org/html/rfc3986#section-3.2.1
{quote}
userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
{quote}
RFC of URL also allows it.
https://tools.ietf.org/html/rfc1738#section-3.1
{quote}
//<user>:<password>@<host>:<port>/<url-path>
Some or all of the parts "<user>:<password>@", ":<password>",
":<port>", and "/<url-path>" may be excluded.
{quote}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)