Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8139

Path does not allow metachars to be escaped

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.23.3, 3.0.0-alpha1
    • None
    • fs
    • None

    Description

      Path converts "\" into "/", probably for windows support? This means it's impossible for the user to escape metachars in a path name. Glob expansion can have deadly results.

      Here are the most egregious examples. A user accidentally creates a path like "/user/me/*/file". Now they want to remove it.

      "hadoop fs -rmr -skipTrash '/user/me/\*'" becomes...
      "hadoop fs -rmr -skipTrash /user/me/*"
      • User/Admin: Nuked their home directory or any given directory
      "hadoop fs -rmr -skipTrash '\*'" becomes...
      "hadoop fs -rmr -skipTrash /*"
      • User: Deleted everything they have access to on the cluster
      • Admin: Nukes the entire cluster

      Note: FsShell is shown for illustrative purposes, however the problem is in the Path object, not FsShell.

      Attachments

        1. HADOOP-8139.patch
          6 kB
          Daryn Sharp
        2. HADOOP-8139.patch
          4 kB
          Daryn Sharp
        3. HADOOP-8139-2.patch
          6 kB
          Daryn Sharp
        4. HADOOP-8139-3.patch
          7 kB
          Daryn Sharp
        5. HADOOP-8139-4.patch
          12 kB
          Daryn Sharp
        6. HADOOP-8139-5.patch
          10 kB
          Daryn Sharp
        7. HADOOP-8139-6.patch
          5 kB
          Daryn Sharp

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daryn Daryn Sharp
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: