Swift doesn't check if the used API version is valid. Currently there
is only one valid REST API version, but that might change in the
future.
This patch enforces "v1" or "v1.0" as the version string when accessing
account, containers and objects.
The list of accepted version strings can be manually overridden using a
comma-separated list in swift.conf to make this backward-compatible.
The constraint loader has been modified slightly to accept strings as
well as integers.
Any request to an account, container, and object which does not
provide the correct version string will get a 400 BadRequest response.
The allowed api versions are by default excluded from /info.
Co-Authored-By: Christian Schwede <email address hidden>
Co-Authored-By: John Dickinson <email address hidden>
Reviewed: https:/ /review. openstack. org/168509 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=4aba2fbb25e df8936e00ee9f57 36cc2c0c383c32
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4aba2fbb25edf89 36e00ee9f5736cc 2c0c383c32
Author: Clay Gerrard <email address hidden>
Date: Fri Mar 27 15:50:38 2015 -0700
Check if REST API version is valid
Swift doesn't check if the used API version is valid. Currently there
is only one valid REST API version, but that might change in the
future.
This patch enforces "v1" or "v1.0" as the version string when accessing
account, containers and objects.
The list of accepted version strings can be manually overridden using a compatible.
comma-separated list in swift.conf to make this backward-
The constraint loader has been modified slightly to accept strings as
well as integers.
Any request to an account, container, and object which does not
provide the correct version string will get a 400 BadRequest response.
The allowed api versions are by default excluded from /info.
Co-Authored-By: Christian Schwede <email address hidden>
Co-Authored-By: John Dickinson <email address hidden>
Closes Bug #1437442
Change-Id: I5ab6e236544378 abf2eab562ab759 513d09bc256