You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2017/02/05 18:36:41 UTC

[jira] [Resolved] (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 ]

Sebb resolved VALIDATOR-387.
----------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.2

URL: http://svn.apache.org/viewvc?rev=1781788&view=rev
Log:
VALIDATOR-387 Userinfo without colon should be valid in UrlValidator

Modified:
    commons/proper/validator/trunk/src/changes/changes.xml
    commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
    commons/proper/validator/trunk/src/test/java/org/apache/commons/validator/routines/UrlValidatorTest.java


> 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
>             Fix For: 1.5.2
>
>
> 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.15#6346)