File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ def csrf_exempt(view_func):
4949from saml2 .sigver import MissingKey
5050from saml2 .s_utils import UnsupportedBinding
5151from saml2 .response import StatusError
52+ from saml2 .validate import ResponseLifetimeExceed , ToEarly
5253from saml2 .xmldsig import SIG_RSA_SHA1 , SIG_RSA_SHA256 # support for SHA1 is required by spec
5354
5455from djangosaml2 .cache import IdentityCache , OutstandingQueriesCache
@@ -258,7 +259,8 @@ def assertion_consumer_service(request,
258259 try :
259260 response = client .parse_authn_request_response (xmlstr , BINDING_HTTP_POST ,
260261 outstanding_queries )
261- except StatusError :
262+ except (StatusError , ResponseLifetimeExceed , ToEarly ):
263+ logger .exception ('Error processing SAML Assertion' )
262264 return render (request , 'djangosaml2/login_error.html' , status = 403 )
263265
264266 except MissingKey :
You can’t perform that action at this time.
0 commit comments