On 04/24/2017 09:45 AM, Jadhav, Pooja wrote:
Solution 3:
We can check UUID in central place means in "is_uuid_like" method of
oslo_utils [4].
This gets my vote. It's a bug in the is_uuid_like() function, IMHO, that
is returns True for badly-formatted UUID values (like having two
consecutive hyphens).
FTR, the fix would be pretty simple. Just change this [1] line from this:
return str(uuid.UUID(val)).replace('-', '') == _format_uuid_string(val)
to this:
# Disallow two consecutive hyphens
if '--' in val:
raise TypeError
return str(uuid.UUID(val)).replace('-', '') == _format_uuid_string(val)
Fix it there and you fix this issue for all projects that use it.
Best,
-jay
[1]
https://github.com/openstack/oslo.utils/blob/master/oslo_utils/uuidutils.py#L56
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev