Commit 4487b6d1 by Braden MacDonald

Fix errors with fetching Shibboleth metadata

parent 1ee3094d
......@@ -63,7 +63,7 @@ def fetch_saml_metadata():
try:
parser = etree.XMLParser(remove_comments=True)
xml = etree.fromstring(response.text, parser)
xml = etree.fromstring(response.content, parser)
except etree.XMLSyntaxError:
raise
# TODO: Can use OneLogin_Saml2_Utils to validate signed XML if anyone is using that
......@@ -80,7 +80,7 @@ def fetch_saml_metadata():
except Exception as err: # pylint: disable=broad-except
log.exception(err.message)
num_failed += 1
return (num_changed, num_failed, len(url_map))
return (num_changed, num_failed, len(url_map))
def _parse_metadata_xml(xml, entity_id):
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Cached and simplified copy of https://www.testshib.org/metadata/testshib-providers.xml -->
<EntitiesDescriptor Name="urn:mace:shibboleth:testshib:two"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment