From 6807612b1c27b2dbe6a37553b41c693c7e7863c4 Mon Sep 17 00:00:00 2001 From: peppelinux Date: Sat, 20 Mar 2021 19:15:36 +0100 Subject: [PATCH] fixed idp metadata export after regression --- src/spid_sp_test/authn_request.py | 2 ++ src/spid_sp_test/spid_sp_test | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spid_sp_test/authn_request.py b/src/spid_sp_test/authn_request.py index 450be21..f9e9d92 100644 --- a/src/spid_sp_test/authn_request.py +++ b/src/spid_sp_test/authn_request.py @@ -62,6 +62,8 @@ def get_authn_request(authn_request_url, verify_ssl=False): # HTTP POST authn_request = request.content.decode() form_dict = samlreq_from_htmlform(authn_request) + if not form_dict: + raise SAMLRequestNotFound(f'{authn_request}') data['action'] = form_dict['action'] data['method'] = form_dict['method'] data['SAMLRequest'] = form_dict['SAMLRequest'] diff --git a/src/spid_sp_test/spid_sp_test b/src/spid_sp_test/spid_sp_test index 223c627..c69fe97 100644 --- a/src/spid_sp_test/spid_sp_test +++ b/src/spid_sp_test/spid_sp_test @@ -182,7 +182,7 @@ if __name__ == '__main__': tests_done = [] if args.idp_metadata: - from spid_sp_test.idp.idp import SAML2_IDP_CONFIG + from spid_sp_test.idp.settings import SAML2_IDP_CONFIG idp_server = Server(SAML2_IDP_CONFIG) idp_metadata = entity_descriptor(idp_server.config)