← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2009724] [NEW] Incorrect URL when browsing Swift containers

 

Public bug reported:

When browsing through OpenStack Swift containers, sometimes Horizon will
incorrectly encode part of the URL/URI of an object, and thus navigate
to the wrong page. This has been reproducible for me by placing an
object in a container more than about 3 pseudo-folders deep. For
example, the structure might look like:

(Container) --> folder1 --> folder2 --> folder3

Upon clicking on folder3 in the Container browser window in Horizon, the
site will try to navigate to
"containers/container/containername/testfolder1%2Ftestfolder2/testfolder3"
rather than the expected
"containers/container/containername/testfolder1/testfolder2/testfolder3".

It appears that at some stage in the process, the path gets HTTP URL
Encoded (encodeURIComponent) too many times. Note that the unexpected
character "%2F" is the encoding of "/".

This is also evident by snooping on the GET request Horizon makes to the
OpenStack Swift backend (see attached screenshot); the delimiter is set
as "%2F", but the path requested has a "%252F" (this is just the double
encoding of "%2F" since the encoding of "%" is "%25").

I'm guessing that there might be some recursive logic somewhere that
results in the end-string being encoded multiple times.

** Affects: horizon
     Importance: Undecided
         Status: New

** Attachment added: "Screenshot of an incorrect HTTP request"
   https://bugs.launchpad.net/bugs/2009724/+attachment/5652805/+files/httprequest.png

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/2009724

Title:
  Incorrect URL when browsing Swift containers

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  When browsing through OpenStack Swift containers, sometimes Horizon
  will incorrectly encode part of the URL/URI of an object, and thus
  navigate to the wrong page. This has been reproducible for me by
  placing an object in a container more than about 3 pseudo-folders
  deep. For example, the structure might look like:

  (Container) --> folder1 --> folder2 --> folder3

  Upon clicking on folder3 in the Container browser window in Horizon,
  the site will try to navigate to
  "containers/container/containername/testfolder1%2Ftestfolder2/testfolder3"
  rather than the expected
  "containers/container/containername/testfolder1/testfolder2/testfolder3".

  It appears that at some stage in the process, the path gets HTTP URL
  Encoded (encodeURIComponent) too many times. Note that the unexpected
  character "%2F" is the encoding of "/".

  This is also evident by snooping on the GET request Horizon makes to
  the OpenStack Swift backend (see attached screenshot); the delimiter
  is set as "%2F", but the path requested has a "%252F" (this is just
  the double encoding of "%2F" since the encoding of "%" is "%25").

  I'm guessing that there might be some recursive logic somewhere that
  results in the end-string being encoded multiple times.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/2009724/+subscriptions



Follow ups