]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix 500 error if 'offset' is out of range
authorDinesh Bhor <dinesh.bhor@nttdata.com>
Tue, 9 Feb 2016 11:20:26 +0000 (03:20 -0800)
committerdineshbhor <dinesh.bhor@nttdata.com>
Fri, 11 Mar 2016 09:10:18 +0000 (09:10 +0000)
commit31ebbc04a9b7bb1d302c98cc61a33d2e1020c25a
tree13442c749e20749fd33f88d24f08138f1cca458b
parent6b864410152f794152a1465beab4dec8feba7f13
Fix 500 error if 'offset' is out of range

If large value is passed as offset to snapshots, volumes,
backups, consistencygroups and qos_specs list api then it
throws 500 internal server error.

Moved existing validate_integer() method from
cinder.api.openstack.wsgi.Controller to cinder.utils so
that it can also be used for validating offset param for
integer value in _get_offset_param() method and return 400
error if value is out of range.

Please refer:
https://bugs.launchpad.net/cinder/+bug/1535708/comments/1

APIImpact: Return 400 status code if offset is out of range.

Closes-Bug: #1535708
Change-Id: I07a5292645f24c381217d43b71510b3352964b8b
18 files changed:
cinder/api/common.py
cinder/api/contrib/quota_classes.py
cinder/api/contrib/quotas.py
cinder/api/contrib/volume_type_encryption.py
cinder/api/openstack/wsgi.py
cinder/tests/unit/api/contrib/test_backups.py
cinder/tests/unit/api/contrib/test_consistencygroups.py
cinder/tests/unit/api/contrib/test_qos_specs_manage.py
cinder/tests/unit/api/contrib/test_quotas.py
cinder/tests/unit/api/contrib/test_quotas_classes.py
cinder/tests/unit/api/contrib/test_volume_type_encryption.py
cinder/tests/unit/api/openstack/test_wsgi.py
cinder/tests/unit/api/test_common.py
cinder/tests/unit/api/v2/test_snapshots.py
cinder/tests/unit/api/v2/test_types.py
cinder/tests/unit/api/v2/test_volumes.py
cinder/tests/unit/test_utils.py
cinder/utils.py