commit 2e70a1717f25652912886cbefa3f40e6df908c00
Author: Johannes Kulik <email address hidden>
Date: Thu Feb 27 08:08:32 2020 +0100
Validate id as integer for os-aggregates
According to the api-ref, the id passed to calls in os-aggregates is
supposed to be an integer. No function validated this, so any value
passed to these functions would directly reach the DB. While this is
fine for SQLite, making a query with a string for an integer column on
other databases like PostgreSQL results in a DBError exception and thus
a HTTP 500 instead of 400 or 404.
This commit adds validation for the id parameter the same way it's
already done for other endpoints.
Reviewed: https:/ /review. opendev. org/710214 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=2e70a1717f2 5652912886cbefa 3f40e6df908c00
Committed: https:/
Submitter: Zuul
Branch: master
commit 2e70a1717f25652 912886cbefa3f40 e6df908c00
Author: Johannes Kulik <email address hidden>
Date: Thu Feb 27 08:08:32 2020 +0100
Validate id as integer for os-aggregates
According to the api-ref, the id passed to calls in os-aggregates is
supposed to be an integer. No function validated this, so any value
passed to these functions would directly reach the DB. While this is
fine for SQLite, making a query with a string for an integer column on
other databases like PostgreSQL results in a DBError exception and thus
a HTTP 500 instead of 400 or 404.
This commit adds validation for the id parameter the same way it's
already done for other endpoints.
Closes-Bug: 1865040
Change-Id: I83817f73016808 01beaee375825f0 2eda526eda1