Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-1993

StringIndexOutOfBoundsException in HMSPathsDumper.java

    XMLWordPrintableJSON

    Details

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

      Description

      The following line in HMSPathsDumper.java is causing StringIndexOutOfBoundsException:

      if (tChildPathElement.charAt(0) == DupDetector.REPLACEMENT_STRING_PREFIX) {
      

      It only happens when a path element is "", when someone mistakenly specifies hdfs path with two "/" in the path section, like hdfs://server//element1//element2, instead of hdfs://server/element1/element2. In principle, such paths are invalid, but this code should be made resistant to them anyway.

        Attachments

        1. SENTRY-1993.01.patch
          3 kB
          Misha Dmitriev

          Activity

            People

            • Assignee:
              misha@cloudera.com Misha Dmitriev
              Reporter:
              misha@cloudera.com Misha Dmitriev
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: