[openstack-dev] [nova][oslo.utils] Bug-1680130 Check validation of UUID length

Sean Dague sean at dague.net
Mon Apr 24 17:58:42 UTC 2017


On 04/24/2017 12:23 PM, Matt Riedemann wrote:
<snip>
> 
> Is "11111111-2222-4444-5555--666666666666" actually getting past the
> jsonschema validation check when attaching a volume to a server? Because
> that's looking for a uuid:
> 
> https://github.com/openstack/nova/blob/0039231719d2a02c59e7cd76631e2ff03cc86b0d/nova/api/validation/parameter_types.py#L298

Which uses is_uuid_like to do the validation -
https://github.com/openstack/nova/blob/1106477b78c80743e6443abc30911b24a9ab7b15/nova/api/validation/validators.py#L85-L87

We assumed (as did many others) that is_uuid_like was strict enough for
param validation. It is apparently not.

Either it needs to be fixed to be so, or some other function needs to be
created that is, that people can cut over to.

	-Sean

-- 
Sean Dague
http://dague.net



More information about the OpenStack-dev mailing list