From ec976813b0388ce3354b43b1a45785d51e667d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 16 Aug 2019 18:34:48 +0200 Subject: [PATCH] authentic agent: pass bytes to ElementTree for metadata validation (#35419) --- hobo/agent/authentic2/management/commands/hobo_deploy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hobo/agent/authentic2/management/commands/hobo_deploy.py b/hobo/agent/authentic2/management/commands/hobo_deploy.py index 4972fe1..039709e 100644 --- a/hobo/agent/authentic2/management/commands/hobo_deploy.py +++ b/hobo/agent/authentic2/management/commands/hobo_deploy.py @@ -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