Updated openstack/openstack
Project: openstack/glance  5db97bfc475690da5141a2911d8da22abdbe3557

Add sort key validation in v2 api

Since v2 api has no sort key validation and the default
pagination check is used it's possible to request something
like /images?sort_key=_sa_class_manager, which causes an
inner SQL exception with 500 response code from the server.

This code validates input sort key and raises an exception
if the parameter is out of the supported keys list.

Closes-bug: 1400366

Change-Id: I0cf58ad198375a2f6f58bd7820cbb9d86003247a