Uploaded image for project: 'Commons Validator'
  1. Commons Validator
  2. VALIDATOR-202

URL Validator isValid method fails with java.lang.ArrayIndexOutOfBoundsException at org.apache.commons.validator.UrlValidator.isValidAuthority(UrlValidator.java:367)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.1 Release
    • Component/s: None
    • Labels:
      None
    • Environment:

      JBOSS Running on Linux

      Description

      Validating the following URL will throw an ArrayIndexOutOfBoundsException exception

      http://www.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.log

      Code:

      String[] schemes =

      {"http","https"}

      .
      UrlValidator urlValidator = new UrlValidator(schemes, UrlValidator.NO_FRAGMENTS) ;
      urlValidator.isValid("http://www.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.logoworks.comwww.log") ;

        Attachments

        1. 202-fix.patch
          0.9 kB
          Henri Yandell
        2. 202-test.patch
          1 kB
          Henri Yandell

        Issue Links

          Activity

            People

            • Assignee:
              bayard Henri Yandell
              Reporter:
              shamsian Ben

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment