Skip to content

Commit 4ced1fe

Browse files
committed
RequestVersionTooLow exception handled in ACS
1 parent aa6f503 commit 4ced1fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

djangosaml2/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
from saml2.ident import code, decode
3535
from saml2.mdstore import SourceNotFound
3636
from saml2.metadata import entity_descriptor
37-
from saml2.response import (SignatureError, StatusAuthnFailed, StatusError,
37+
from saml2.response import (RequestVersionTooLow,
38+
SignatureError, StatusAuthnFailed, StatusError,
3839
StatusNoAuthnContext, StatusRequestDenied,
3940
UnsolicitedResponse)
4041
from saml2.s_utils import UnsupportedBinding
@@ -346,6 +347,9 @@ def post(self, request, attribute_mapping=None, create_unknown_user=None):
346347
except UnsolicitedResponse as e:
347348
_exception = e
348349
logger.exception("Received SAMLResponse when no request has been made.")
350+
except RequestVersionTooLow as e:
351+
_exception = e
352+
logger.exception("Received SAMLResponse have a deprecated SAML2 VERSION.")
349353

350354
if _exception:
351355
return self.handle_acs_failure(request, exception=_exception)

0 commit comments

Comments
 (0)