Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: SAML: IDP initiated logout request comes with RelayState and it causes error #818

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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")

Check warning on line 308 in social_core/backends/saml.py

View check run for this annotation

Codecov / codecov/patch

social_core/backends/saml.py#L307-L308

Added lines #L307 - L308 were not covered by tests

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