Skip to content

Commit

Permalink
fix: Destination missing or unvalued. Fixes: IdentityPython#770
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Mar 20, 2021
1 parent c1fab71 commit a50db00
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/saml2/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,16 @@ def _verify(self):
else:
raise RequestVersionTooHigh()

destination = self.response.destination
if self.asynchop:
# Destination must be present
if (
self.response.destination
and self.response.destination not in self.return_addrs
not destination
or destination not in self.return_addrs
):
logger.error("%s not in %s", self.response.destination, self.return_addrs)
logger.error(
f"{destination} not in {self.return_addrs}"
)
return None

valid = self.issue_instant_ok() and self.status_ok()
Expand Down Expand Up @@ -1116,7 +1120,7 @@ def session_info(self):
raise StatusInvalidAuthnResponseStatement(
"The Authn Response Statement is not valid"
)

def __str__(self):
return self.xmlstr

Expand Down

0 comments on commit a50db00

Please sign in to comment.