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:03:39 UTC

[jira] [Updated] (VALIDATOR-387) Userinfo without colon should be valid in UrlValidator

     [ https://issues.apache.org/jira/browse/VALIDATOR-387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shumpei Akai updated VALIDATOR-387:
-----------------------------------
    Description: 
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}

I created Pull Request.
https://github.com/apache/commons-validator/pull/5

  was:
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}




> 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}
> I created Pull Request.
> https://github.com/apache/commons-validator/pull/5



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)