-
-
Notifications
You must be signed in to change notification settings - Fork 569
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extra validations to prevent Signature wrapping attacks
There was a bug on the toolkit that made it vulnerable to a Signature wrapping attacks in the specific scenario where there was a Signature that referenced at the same time 2 elements (but past the scheme validator process since 1 of the element was inside the encrypted assertion. On this commit we added 3 new validators in order to avoid Signature wrapping attacks: - Extra validations at the validate_signed_elements method to check that the ref URIs and IDs are unique and consistent. - Validate the document (encrypted and decrypted version) against the scheme. - Use at validate_signature method the same logic than in xpath_from_signed_assertion (adding the 'id' => doc.signed_element_id condition).
- Loading branch information
Showing
1 changed file
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters