Copying objects in swift with a leading / in the path

Bug #1329653 reported by Kalle Happonen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
Undecided
Unassigned

Bug Description

(RDO Havana)
This seems to ignore the path altogether or give an error depending on the path and destination container.

That said, I'm not sure what the correct way to handle a leading slash is, but currently it's inconsistent.

The resulting copies are visible in horizon, but can't be downloaded.

Tags: swift
description: updated
Revision history for this message
Adam Thurlow (thurloat) wrote :

Ran into this as well on an object with a leading slash not being able to download.

Changed the url pattern to "r'^(?P<container_name>.+)/download:(?P<object_path>.+)$'" - that way Django / nginx won't strip out the double "//" in the url and have swift not be able to find the file because the file name actually starts with the leading slash.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Kalle, can you give some steps in the description on how to reproduce the problem? I've had no problem creating and copying objects with names beginning with a slash in devstack. Is this Havana only?

Changed in horizon:
status: New → Incomplete
Revision history for this message
Kalle Happonen (kalle-happonen) wrote :

Hi Gary,
sorry for the rather brief original report. Here are the steps to reproduce. We're currently on Icehouse. So if this doesn't trigger the problem on Juno, the issue is probably fixed.

1. Create a new container
2. Upload a file to the container
3. Select "copy" for the object
4. Choose
  - Same container
  - Path: /newpath
  - Destination object name: whatever
5. Go to the container (the copy shows up in the root of the container), try to download the copied object
6. Error message: Unable to retrieve object

Changed in horizon:
status: Incomplete → New
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Thanks for including the details. This scenario works fine for me on master, so closing. Please re-open if you can reproduce it on Juno or Kilo.

Changed in horizon:
status: New → Invalid
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.