Project

General

Profile

Actions

Bug #20278

open

Validation of container paths in RGW / Swift API.

Added by Ross Martyn almost 7 years ago. Updated almost 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

After working with curl to manually create some containers(buckets) via the RGW/Swift API, I happened to accidentally create a couple called "/container1/photo.jpg" and "/container1/photo.jpg2"

I believe that swift is not designed to work like this, as a swift container should be "/container/path/to/file". A container name should not incorporate a "/". This is echo'ed by the fact that its very difficult to delete as the swift client replies with.

{{{
:~# swift delete /container1/photo.jpg2 --insecure
WARNING: / in container name; you might have meant 'container1 photo.jpg2' instead of 'container1/photo.jpg2'.
}}}

This makes for some interesting redirecting in the OpenStack Horizon interface too.

It seems like the API should validate the POST calls to reject this incorrect syntax.

Actions

Also available in: Atom PDF