commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shumpei Akai (JIRA)" <j...@apache.org>
Subject [jira] [Created] (VALIDATOR-387) Userinfo without colon should be valid in UrlValidator
Date Thu, 28 Jan 2016 07:00:47 GMT
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)

Mime
View raw message