Skip to content

Commit f011fda

Browse files
committed
Improved inResponse validation on Responses
1 parent 054f8e6 commit f011fda

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
@@ -104,7 +104,7 @@ def is_valid(self, request_data, request_id=None):
104104

105105
# Check if the InResponseTo of the Response matchs the ID of the AuthNRequest (requestId) if provided
106106
in_response_to = self.document.get('InResponseTo', None)
107-
if in_response_to and request_id:
107+
if in_response_to is not None and request_id is not None:
108108
if in_response_to != request_id:
109109
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))
110110

0 commit comments

Comments
 (0)