-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(address-hooks): version robustness and hardening (#10683)
closes: #10681 ## Description Be more robust for Address Hook version compatibility: return an error if the magic bytes match but the version number is unsupported. If the magic bytes don't match, it is not an address hook, so pass through the specimen as the `baseAddress` with empty `hookData`. Also, `harden` the exports and returned objects if running under HardenedJS. ### Security Considerations Stronger Address Hook classification helps prevent accidental collisions. Hardened return objects and exported functions have fewer mutability concerns. ### Scaling Considerations n/a ### Documentation Considerations n/a ### Testing Considerations Some unhappy-path testing has been added to verify at least these issues have been addressed. ### Upgrade Considerations n/a
- Loading branch information
Showing
4 changed files
with
177 additions
and
48 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
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
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
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