Skip to content

Commit b96fa7f

Browse files
author
mrbasil
authored
Update response.py
signature check logic has not statements in the wrong places
1 parent 2e91590 commit b96fa7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/onelogin/saml2/response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ def is_valid(self, request_data, request_id=None):
201201
if not any_subject_confirmation:
202202
raise Exception('A valid SubjectConfirmation was not found on this Response')
203203

204-
if security['wantAssertionsSigned'] and not not has_signed_assertion:
204+
if security['wantAssertionsSigned'] and not has_signed_assertion:
205205
raise Exception('The Assertion of the Response is not signed and the SP require it')
206206

207-
if security['wantMessagesSigned'] and has_signed_response:
207+
if security['wantMessagesSigned'] and not has_signed_response:
208208
raise Exception('The Message of the Response is not signed and the SP require it')
209209

210210
if not signed_elements or (not has_signed_response and not has_signed_assertion):

0 commit comments

Comments
 (0)