Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-243

Filebrowser links are being inconsistently urlencoded

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.1.0
    • Component/s: app.filebrowser
    • Labels:
      None

      Description

      Vinithra noticed that a directory with "#" in the name would not work in the file browser. Turns out this is because the paths were not being appropriately URL decoded.

      There are two code paths in the templates. We have some views that have the path as part of the Django url resolution (e.g., /filebrowser/view/foo). Here, the foo must be encoded first, because when django matches the regular expression, it doesn't end up url encoding the result. The other path is utilities like filebrowser/remove?path=/foo. Here life is easier, and I changed the code to use reverse_with_get. It turned out that reverse_with_get used urllib.urlencode which is not unicode safe. Neither is django.http.urlencode. But django.utils.http.urlencode works just fine. Go figure.

      Review forth-coming. Would appreciate a sanity check from someone.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              philip Philip Zeyliger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: