Comment 6 for bug 1865040

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/710214
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2e70a1717f25652912886cbefa3f40e6df908c00
Submitter: Zuul
Branch: master

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.

    Closes-Bug: 1865040

    Change-Id: I83817f7301680801beaee375825f02eda526eda1