Hadoop Common
  1. Hadoop Common
  2. HADOOP-8139

Path does not allow metachars to be escaped

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.23.3, 3.0.0
    • Fix Version/s: None
    • Component/s: fs
    • Labels:
      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.

      1. HADOOP-8139.patch
        4 kB
        Daryn Sharp
      2. HADOOP-8139.patch
        6 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

            • Assignee:
              Unassigned
              Reporter:
              Daryn Sharp
            • Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:

                Development