fix(ColdStorageAddressBookModule): enforce validation on addAllowedRecipients and unblock module execution calls#114
Open
giwaov wants to merge 1 commit into
Conversation
…cipients and unblock module execution calls - Set skipRuntimeValidation to false for addAllowedRecipients so runtime validation is enforced (fixes circlefin#111) - Enable allowGlobalValidation for addAllowedRecipients to match the pattern used by removeAllowedRecipients - Replace revert Unsupported() with passthrough return in both preUserOpValidationHook and preRuntimeValidationHook for unrecognized entity IDs, so module execution functions like addAllowedRecipients/removeAllowedRecipients are not blocked by the validation hook (fixes circlefin#112)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #111 and #112.
Problem
Issue #111 - Unauthorized allowlist expansion:
\�ddAllowedRecipients()\ was configured with \skipRuntimeValidation: true\ in the execution manifest, allowing any external address to call \�ccount.addAllowedRecipients([attackerAddress])\ without authorization. Meanwhile,
emoveAllowedRecipients()\ correctly used \skipRuntimeValidation: false.
Issue #112 - Validation hook blocks module execution functions:
\preUserOpValidationHook\ and \preRuntimeValidationHook\ reverted with \Unsupported()\ for unrecognized entity IDs. When the module's validation hook is installed and a call to \�ddAllowedRecipients()\ or
emoveAllowedRecipients()\ is made directly (not via \execute()/\executeBatch()), the hook doesn't recognize the entity ID and reverts, blocking the intended execution flow.
Fix
emoveAllowedRecipients\
evert Unsupported()\ with passthrough
eturn\ in both \preUserOpValidationHook\ and \preRuntimeValidationHook\ for unrecognized entity IDs
Single file, +8/-4 lines.