-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
GSNSignatureBouncer fix #1920
GSNSignatureBouncer fix #1920
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @crazyrabbitLTC, this is a great catch! I had not realized the implications behind allowing this.
Let's do a review here and then migrate those changes to the ethereum-package repo.
Makes sense! Co-Authored-By: Nicolás Venturo <[email protected]>
ok! Co-Authored-By: Nicolás Venturo <[email protected]>
…zeppelin-contracts into GSNSignatureBouncerFix
@crazyrabbitLTC I reverted some reformatting that I assume was automatically done by Prettier. Please be careful not to include that sort of thing in the PR, at least unless intended. 🙂 |
* GSNSignatureBoucer does not accept zero address * Linting code. * Update contracts/GSN/bouncers/GSNBouncerSignature.sol Makes sense! Co-Authored-By: Nicolás Venturo <[email protected]> * Update test/GSN/GSNBouncerSignature.test.js ok! Co-Authored-By: Nicolás Venturo <[email protected]> * Add zero address constant from OZ test Helpers * revert prettier formatting (cherry picked from commit f9a9478)
Ref: OpenZeppelin/openzeppelin-contracts-upgradeable#67
Current version of the code means the GSNSignatureBouncer will accept Zero Addresses as a trusted signer. The result is that unexpectedly the contract will accept the absence of a signature as a valid signature. The added check prevents the constructor from being called with a zero address.
Fixes #
A require statement was added on the constructor to prevent Zero Address from being supplied as the Trusted Signer. This will prevent the contract being deployed with a Zero Address.
I added a test to check this functionality.