Skip to content

Commit 18fbd74

Browse files
committed
fix: Destination missing or unvalued. Fixes: IdentityPython#770
1 parent 3cb6805 commit 18fbd74

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/saml2/response.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,16 @@ def _verify(self):
408408
else:
409409
raise RequestVersionTooHigh()
410410

411+
destination = self.response.destination
411412
if self.asynchop:
413+
# Destination must be present
412414
if (
413-
self.response.destination
414-
and self.response.destination not in self.return_addrs
415+
not destination
416+
or destination not in self.return_addrs
415417
):
416-
logger.error("%s not in %s", self.response.destination, self.return_addrs)
418+
logger.error(
419+
f"{destination} not in {self.return_addrs}"
420+
)
417421
return None
418422

419423
valid = self.issue_instant_ok() and self.status_ok()
@@ -1116,7 +1120,7 @@ def session_info(self):
11161120
raise StatusInvalidAuthnResponseStatement(
11171121
"The Authn Response Statement is not valid"
11181122
)
1119-
1123+
11201124
def __str__(self):
11211125
return self.xmlstr
11221126

0 commit comments

Comments
 (0)