Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[audit] #16: Bring SybilResistanceVerifier into compliance with EIP-191 #47

Merged
merged 4 commits into from
Jul 9, 2024

Conversation

stevieraykatz
Copy link
Collaborator

@stevieraykatz stevieraykatz commented Jun 25, 2024

This PR adds address(this) to the expected signature hash.

From Spearbit:

Description
As per EIP-191 the following bytes after 1900 should be the (i.e, address(this)). This is done so that the signatures cannot be replayed across different contracts.

The SybilResistanceVerifier._makeSignatureHash currently appends the signer address after 1900.

Recommendation
Consider appending address(this) after 1900.

    keccak256(abi.encodePacked(hex"1900", address(this), ...));

@cb-heimdall
Copy link
Collaborator

Review Error for ricardoMogg @ 2024-06-25 17:15:14 UTC
User must have write permissions to review

@stevieraykatz stevieraykatz merged commit 885c46f into main Jul 9, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants