Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-559

FilenameUtils.normalize should verify hostname syntax in UNC path

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.7
    • Component/s: Utilities
    • Labels:
      None

      Description

      FilenameUtils.normalize will accept broken file names as UNC path even if their hostname part doesn't match the syntax of a proper hostname. Using certain hostnames like "." this may lead to strange side effects.

      Most likely the best fix will be to make getPrefixLength verify the hostname part of a suspected UNC path and return a value of NOT_FOUND if it is not a valid hostname - much like it does for triple slashes.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bodewig Stefan Bodewig
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: