Skip to content

Commit 697e61f

Browse files
committed
Comment
1 parent 8024ea1 commit 697e61f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Bug fixes
44

55
- `ERC165Checker`: Ensure the `supportsERC165` function returns false if the target reverts during the `supportsInterface(0xffffffff)` call. ([#5810](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5880))
6+
- `AccountERC7579`: Prevent revert in `isModuleInstalled` for fallback modules when `additionalContext` has fewer than 4 bytes. The function now returns `false` instead of reverting, ensuring ERC-7579 compliance. ([#5961](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5961))
67

78
### Breaking changes
89

contracts/account/extensions/draft-AccountERC7579.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ abstract contract AccountERC7579 is Account, IERC1271, IERC7579Execution, IERC75
150150
if (moduleTypeId == MODULE_TYPE_VALIDATOR) return _validators.contains(module);
151151
if (moduleTypeId == MODULE_TYPE_EXECUTOR) return _executors.contains(module);
152152
if (moduleTypeId == MODULE_TYPE_FALLBACK)
153+
// ERC-7579 requires this function to return bool, never revert. Check length to avoid out-of-bounds access.
153154
return additionalContext.length > 3 && _fallbacks[bytes4(additionalContext[0:4])] == module;
154155
return false;
155156
}

0 commit comments

Comments
 (0)