Skip to content

Commit

Permalink
fix: handle with missing param about RelayState
Browse files Browse the repository at this point in the history
  • Loading branch information
zevitagem authored and nijel committed Sep 12, 2023
1 parent 013d27d commit 1f60571
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion social_core/backends/saml.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ def auth_complete(self, *args, **kwargs):
The user has been redirected back from the IdP and we should
now log them in, if everything checks out.
"""
idp_name = self.strategy.request_data()["RelayState"]
try:
idp_name = self.strategy.request_data()["RelayState"]
except KeyError:
raise AuthMissingParameter(self, "RelayState")

idp = self.get_idp(idp_name)
auth = self._create_saml_auth(idp)
auth.process_response()
Expand Down

0 comments on commit 1f60571

Please sign in to comment.