Skip to content

objectstorage: Reject container names with a slash#2552

Merged
EmilienM merged 1 commit intogophercloud:masterfrom
shiftstack:container_no_slash
Feb 13, 2023
Merged

objectstorage: Reject container names with a slash#2552
EmilienM merged 1 commit intogophercloud:masterfrom
shiftstack:container_no_slash

Conversation

@pierreprinetti
Copy link
Copy Markdown
Member

@pierreprinetti pierreprinetti commented Feb 6, 2023

As per the OpenStack object-storage docs, container names must not contain a slash (/).

By accepting them, some functions change their meaning. For example, by passing a container name with a slash to containers.Create, it is possible to actually create an object (if the container exists already).

With this patch, objectstorage functions error when called with a containerName containing a slash.

Fixes #2551

As per the [OpenStack object-storage
docs](https://docs.openstack.org/api-ref/object-store/#create-container),
container names must not contain a slash (`/`).

With this patch, objectstorage functions error when called with a containerName
containing a slash.
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage: 80.131% (+0.03%) from 80.096% when pulling c1d91a7 on shiftstack:container_no_slash into 49ee5b4 on gophercloud:master.

@EmilienM EmilienM merged commit 3d9be97 into gophercloud:master Feb 13, 2023
@EmilienM EmilienM deleted the container_no_slash branch February 13, 2023 14:17
@mandre mandre added this to the v1.3.0 milestone Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[objectstorage] Gophercloud accepts container names with a slash character

4 participants