Staticweb doesn't handle double-slashes in object names well

Bug #1884285 reported by Tim Burke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
In Progress
Undecided
Unassigned

Bug Description

Specifically, it makes a link to "/" -- i.e., the server root -- which will almost certainly 404.

If we force the href at https://github.com/openstack/swift/blob/2.25.0/swift/common/middleware/staticweb.py#L326 to start with "./", it should fix it.

I could see someone trying to use this as a "feature" to hide some parts of the container -- but it wouldn't work very well: if a user manually adds the extra slash at the end of the URL, the listing works as expected. Which is to say, I think we can just fix the bug and not worry about upgrade concerns.

Tags: staticweb
Revision history for this message
Tim Burke (1-tim-z) wrote :

Also affects objects that end in "." or "..", and objects that contain "../".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.