[jira] Created: (VALIDATOR-276) isValidURL call returns false for file scheme/protocol when URL is correct

6 messages Options
Embed this post
Permalink
JIRA jira@apache.org

[jira] Created: (VALIDATOR-276) isValidURL call returns false for file scheme/protocol when URL is correct

Reply Threaded More More options
Print post
Permalink
isValidURL call returns false for file scheme/protocol when URL is correct
--------------------------------------------------------------------------

                 Key: VALIDATOR-276
                 URL: https://issues.apache.org/jira/browse/VALIDATOR-276
             Project: Commons Validator
          Issue Type: Bug
          Components: Framework
    Affects Versions: 1.3.1 Release
         Environment: Linux prometheus 2.6.26-1-amd64 #1 SMP Fri Mar 13 17:46:45 UTC 2009 x86_64 GNU/Linux, Debian sid

            Reporter: Alex


Validate a URL using the file scheme/protocol for a file on a local Linux filesystem returns false. The following code snippet proves it:

import org.apache.commons.validator.UrlValidator;

class URLTest {

        public static void main(String[] args) {
                String url = "file:///etc/hosts";
                UrlValidator urlValidator = new UrlValidator(new String[] {"http", "https", "ftp", "gopher", "file"});
                boolean result = urlValidator.isValid(url);
                System.out.println(String.format("URL '%s' is valid: %s", url, result));
        }

}

This issue occurs whether the scheme String[] constructor or the ALLOW_ALL_SCHEMES equivalent is used.


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Commented: (VALIDATOR-276) isValidURL call returns false for file scheme/protocol when URL is correct

Reply Threaded More More options
Print post
Permalink

    [ https://issues.apache.org/jira/browse/VALIDATOR-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719274#action_12719274 ]

Alex commented on VALIDATOR-276:
--------------------------------

JDK version: 1.6.0_14


> isValidURL call returns false for file scheme/protocol when URL is correct
> --------------------------------------------------------------------------
>
>                 Key: VALIDATOR-276
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-276
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.3.1 Release
>         Environment: Linux prometheus 2.6.26-1-amd64 #1 SMP Fri Mar 13 17:46:45 UTC 2009 x86_64 GNU/Linux, Debian sid
>            Reporter: Alex
>
> Validate a URL using the file scheme/protocol for a file on a local Linux filesystem returns false. The following code snippet proves it:
> import org.apache.commons.validator.UrlValidator;
> class URLTest {
> public static void main(String[] args) {
> String url = "file:///etc/hosts";
> UrlValidator urlValidator = new UrlValidator(new String[] {"http", "https", "ftp", "gopher", "file"});
> boolean result = urlValidator.isValid(url);
> System.out.println(String.format("URL '%s' is valid: %s", url, result));
> }
> }
> This issue occurs whether the scheme String[] constructor or the ALLOW_ALL_SCHEMES equivalent is used.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Updated: (VALIDATOR-276) isValidURL call returns false for file scheme/protocol when URL is correct

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

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

atc updated VALIDATOR-276:
--------------------------

    Attachment: URLTest.java

This small app runs numerous tests, all of which should yield true but don't. I ran these with the following JARs:
commons-validator-1.3.1.jar
jakarta-oro-2.0.8.jar

> isValidURL call returns false for file scheme/protocol when URL is correct
> --------------------------------------------------------------------------
>
>                 Key: VALIDATOR-276
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-276
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.3.1 Release
>         Environment: Linux prometheus 2.6.26-1-amd64 #1 SMP Fri Mar 13 17:46:45 UTC 2009 x86_64 GNU/Linux, Debian sid
>            Reporter: atc
>         Attachments: URLTest.java
>
>
> Validate a URL using the file scheme/protocol for a file on a local Linux filesystem returns false. The following code snippet proves it:
> import org.apache.commons.validator.UrlValidator;
> class URLTest {
> public static void main(String[] args) {
> String url = "file:///etc/hosts";
> UrlValidator urlValidator = new UrlValidator(new String[] {"http", "https", "ftp", "gopher", "file"});
> boolean result = urlValidator.isValid(url);
> System.out.println(String.format("URL '%s' is valid: %s", url, result));
> }
> }
> This issue occurs whether the scheme String[] constructor or the ALLOW_ALL_SCHEMES equivalent is used.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Issue Comment Edited: (VALIDATOR-276) isValidURL call returns false for file scheme/protocol when URL is correct

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/VALIDATOR-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719562#action_12719562 ]

atc edited comment on VALIDATOR-276 at 6/15/09 7:07 AM:
--------------------------------------------------------

This small app ([^URLTest.java]) runs numerous tests, all of which should yield true but don't. I ran these with the following JARs:
commons-validator-1.3.1.jar
jakarta-oro-2.0.8.jar

      was (Author: atc):
    This small app runs numerous tests, all of which should yield true but don't. I ran these with the following JARs:
commons-validator-1.3.1.jar
jakarta-oro-2.0.8.jar
 

> isValidURL call returns false for file scheme/protocol when URL is correct
> --------------------------------------------------------------------------
>
>                 Key: VALIDATOR-276
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-276
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.3.1 Release
>         Environment: Linux prometheus 2.6.26-1-amd64 #1 SMP Fri Mar 13 17:46:45 UTC 2009 x86_64 GNU/Linux, Debian sid
>            Reporter: atc
>         Attachments: URLTest.java
>
>
> Validate a URL using the file scheme/protocol for a file on a local Linux filesystem returns false. An extensive set of tests can be found here: [^URLTest.java].
> The following code snippet is a quick proof-of-concept:
> {noformat}
> import org.apache.commons.validator.UrlValidator;
> class URLTest {
> public static void main(String[] args) {
> String url = "file:///etc/hosts";
> UrlValidator urlValidator = new UrlValidator(new String[] {"http", "https", "ftp", "gopher", "file"});
> boolean result = urlValidator.isValid(url);
> System.out.println(String.format("URL '%s' is valid: %s", url, result));
> }
> }
> {noformat}
> This issue occurs whether the scheme String[] constructor or the ALLOW_ALL_SCHEMES equivalent is used.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Updated: (VALIDATOR-276) isValidURL call returns false for file scheme/protocol when URL is correct

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

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

atc updated VALIDATOR-276:
--------------------------

    Description:
Validate a URL using the file scheme/protocol for a file on a local Linux filesystem returns false. An extensive set of tests can be found here: [^URLTest.java].

The following code snippet is a quick proof-of-concept:

{noformat}
import org.apache.commons.validator.UrlValidator;

class URLTest {

        public static void main(String[] args) {
                String url = "file:///etc/hosts";
                UrlValidator urlValidator = new UrlValidator(new String[] {"http", "https", "ftp", "gopher", "file"});
                boolean result = urlValidator.isValid(url);
                System.out.println(String.format("URL '%s' is valid: %s", url, result));
        }

}
{noformat}
This issue occurs whether the scheme String[] constructor or the ALLOW_ALL_SCHEMES equivalent is used.


  was:
Validate a URL using the file scheme/protocol for a file on a local Linux filesystem returns false. The following code snippet proves it:

import org.apache.commons.validator.UrlValidator;

class URLTest {

        public static void main(String[] args) {
                String url = "file:///etc/hosts";
                UrlValidator urlValidator = new UrlValidator(new String[] {"http", "https", "ftp", "gopher", "file"});
                boolean result = urlValidator.isValid(url);
                System.out.println(String.format("URL '%s' is valid: %s", url, result));
        }

}

This issue occurs whether the scheme String[] constructor or the ALLOW_ALL_SCHEMES equivalent is used.



> isValidURL call returns false for file scheme/protocol when URL is correct
> --------------------------------------------------------------------------
>
>                 Key: VALIDATOR-276
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-276
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.3.1 Release
>         Environment: Linux prometheus 2.6.26-1-amd64 #1 SMP Fri Mar 13 17:46:45 UTC 2009 x86_64 GNU/Linux, Debian sid
>            Reporter: atc
>         Attachments: URLTest.java
>
>
> Validate a URL using the file scheme/protocol for a file on a local Linux filesystem returns false. An extensive set of tests can be found here: [^URLTest.java].
> The following code snippet is a quick proof-of-concept:
> {noformat}
> import org.apache.commons.validator.UrlValidator;
> class URLTest {
> public static void main(String[] args) {
> String url = "file:///etc/hosts";
> UrlValidator urlValidator = new UrlValidator(new String[] {"http", "https", "ftp", "gopher", "file"});
> boolean result = urlValidator.isValid(url);
> System.out.println(String.format("URL '%s' is valid: %s", url, result));
> }
> }
> {noformat}
> This issue occurs whether the scheme String[] constructor or the ALLOW_ALL_SCHEMES equivalent is used.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

JIRA jira@apache.org

[jira] Updated: (VALIDATOR-276) isValidURL call returns false for file scheme/protocol when URL is correct

Reply Threaded More More options
Print post
Permalink
In reply to this post by JIRA jira@apache.org

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

atc updated VALIDATOR-276:
--------------------------

    Priority: Critical  (was: Major)

> isValidURL call returns false for file scheme/protocol when URL is correct
> --------------------------------------------------------------------------
>
>                 Key: VALIDATOR-276
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-276
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 1.3.1 Release
>         Environment: Linux prometheus 2.6.26-1-amd64 #1 SMP Fri Mar 13 17:46:45 UTC 2009 x86_64 GNU/Linux, Debian sid
>            Reporter: atc
>            Priority: Critical
>         Attachments: URLTest.java
>
>
> Validate a URL using the file scheme/protocol for a file on a local Linux filesystem returns false. An extensive set of tests can be found here: [^URLTest.java].
> The following code snippet is a quick proof-of-concept:
> {noformat}
> import org.apache.commons.validator.UrlValidator;
> class URLTest {
> public static void main(String[] args) {
> String url = "file:///etc/hosts";
> UrlValidator urlValidator = new UrlValidator(new String[] {"http", "https", "ftp", "gopher", "file"});
> boolean result = urlValidator.isValid(url);
> System.out.println(String.format("URL '%s' is valid: %s", url, result));
> }
> }
> {noformat}
> This issue occurs whether the scheme String[] constructor or the ALLOW_ALL_SCHEMES equivalent is used.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.