swift object url encoding issue when name has spaces

Bug #1336603 reported by Cindy Lu
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Ashish Chandra

Bug Description

Two issues:

(1) Unable to 'View Details' for object with spaces in its name
I create an empty object with name: 'a b c'. In the table it shows up the same 'a b c', and in the 'Edit Object', it is encoded: a%20b%20c.

However, if I try to 'View Details' for this item, it gives me an error:

Recoverable error: Object HEAD failed: http://<whatever>/v1/AUTH_d7fbc9508550489887f6f28e59086661/test_container/a%2520b%2520c 404 Not Found

(2) Inconsistent object name whether it is created new or cloned
If I create an object called 'abc'. Clone it (becomes 'abc copy'). Clone the new item (becomes
abc%20copy copy). Clone the new item again (becomes abc%2520copy%20copy copy).

The table will look like this:
abc
abc copy
abc%20copy copy
abc%2520copy%20copy copy

However, this is different from when I did 'a b c.' I expect the table *not* to show the encoded spaces.

Tags: swift
Changed in horizon:
status: New → Confirmed
assignee: nobody → Ashish Chandra (ashish-chandra)
Revision history for this message
Ashish Chandra (ashish-chandra) wrote :

I find the same issue with container as well:

1) Unable to 'View Details' of a newly container if name contains spaces in between.

I created a new container with name 'a b c' , when clicking 'View Details', gives error in backend as:

Recoverable error: Container HEAD failed: http://ubuntu-server.example.com/swift/v1/a%2520b%2520c 404 Not Found

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

Note also that with a container with a space in its name, the Project/Containers panel will display the error "Error: Unable to retrieve object list" whenever the panel is displayed or updated.

Changed in horizon:
importance: Undecided → Medium
tags: added: swift
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/115943

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/115943
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Romain Hardouin (romain-hardouin) wrote :

There is a workaround in Horizon to handle correctly special chars in containers' name when using a version of Django < 1.6.
A changeset that checks which version of Django is used has been merged on January 22: https://review.openstack.org/#/c/142007/1

In short: it's fixed.

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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