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

UrlValidator rejects path having two or more successive dots

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1 Release
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None

      Description

      Minmal example:

      UrlValidator urlValidator = new UrlValidator();
      boolean isValidOneDot = urlValidator.isValid("http://www.example.org/hello.world/"); // evaluates to true
      boolean isValidTwoDots = urlValidator.isValid("http://www.example.org/hello..world/"); // evaluates to false
      

      Real world example:

      UrlValidator urlValidator = new UrlValidator();
      boolean isValidRealWord = urlValidator.isValid("http://forum.golem.de/sonstiges/trollwiese/apple-bashing-in-3...2...1...go/98,4089549,4089549,read.html#msg-4089549"); // evaluates to false
      

        Attachments

        1. VALIDATOR-363.patch
          2 kB
          Ayoma Wijethunga

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Stefan Pi Stefan Pi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: