Skip to content

Commit 367d6dc

Browse files
committed
Improved inResponse validation on Responses
1 parent 0ede13f commit 367d6dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/onelogin/saml2/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def is_valid(self, request_data, request_id=None):
108108

109109
# Check if the InResponseTo of the Response matchs the ID of the AuthNRequest (requestId) if provided
110110
in_response_to = self.document.get('InResponseTo', None)
111-
if in_response_to and request_id:
111+
if in_response_to is not None and request_id is not None:
112112
if in_response_to != request_id:
113113
raise Exception('The InResponseTo of the Response: %s, does not match the ID of the AuthNRequest sent by the SP: %s' % (in_response_to, request_id))
114114

0 commit comments

Comments
 (0)