authentic agent: pass bytes to ElementTree for metadata validation (#35419)

This commit is contained in:
Frédéric Péters 2019-08-16 18:34:48 +02:00
parent 24477e2fd8
commit ec976813b0
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ class Command(hobo_deploy.Command):
def check_saml_metadata(self, saml_metadata):
try:
root = ET.fromstring(saml_metadata)
root = ET.fromstring(saml_metadata.encode('utf-8'))
except ET.ParseError:
return False
return root.tag == '{%s}EntityDescriptor' % lasso.SAML2_METADATA_HREF