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
(cherry picked from commit 8649fdc2a2)
This commit is contained in:
Alan Bishop 2020-01-31 06:25:31 -08:00
parent fb7f3e12fa
commit c5bdc55366
1 changed files with 1 additions and 1 deletions

View File

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