Ensure store ID parsed from URI is properly encoded

Ensure the store ID parsed from a request URI is unicode. This fixes
a py27 issue that allowed an incorrectly encoded value to be added to
the image's metadata.

Support for py27 is dropped in Ussuri, but this fix is required on
earlier releases that do support py27.

Closes-Bug: #1861501
Change-Id: I5a1c61430879a910e7b6c79effba538431959d56
This commit is contained in:
Alan Bishop 2020-01-31 06:25:31 -08:00
parent 26c5c8dff6
commit 8649fdc2a2

View File

@ -172,7 +172,7 @@ def _get_store_id_from_uri(uri):
break
if url_matched:
return store
return u"%s" % store
else:
LOG.warning("Invalid location uri %s", uri)
return