Skip to content

Commit d5f9434

Browse files
committed
Revert _extractSignatureValidator and add note
1 parent 6c8aaca commit d5f9434

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- `SignerERC7702` is renamed as `SignerEIP7702`. Imports and inheritance must be updated to that new name and path. Behavior is unmodified.
1212
- `ERC721Holder`, `ERC1155Holder`, `ReentrancyGuard` and `ReentrancyGuardTransient` are flagged as stateless and are no longer transpiled. Developers using their upgradeable variants from `@openzeppelin/contracts-upgradeable` must update their imports to use the equivalent version available in `@openzeppelin/contracts`.
1313
- Update minimum pragma to 0.8.24 in `Votes`, `VotesExtended`, `ERC20Votes`, `Strings`, `ERC1155URIStorage`, `MessageHashUtils`, `ERC721URIStorage`, `ERC721Votes`, `ERC721Wrapper`, `ERC721Burnable`, `ERC721Consecutive`, `ERC721Enumerable`, `ERC721Pausable`, `ERC721Royalty`, `ERC721Wrapper`, `EIP712`, `ERC4626` and `ERC7739`. ([#5726](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5726))
14+
- `AccountERC7579`: Installing and uninstalling fallback modules now require the corresponding `initData` and `deInitData` arguments to be at least 4 bytes long (matching the selector to which the fallback module is registered). It now reverts with `ERC7579CannotDecodeFallbackData` instead of treating the missing bytes as `0x00`.
1415

1516
### Deprecation
1617

contracts/account/extensions/draft-AccountERC7579.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,13 @@ abstract contract AccountERC7579 is Account, IERC1271, IERC7579Execution, IERC75
386386
* https://github.com/erc7579/erc7579-implementation/blob/16138d1afd4e9711f6c1425133538837bd7787b5/src/MSAAdvanced.sol#L296[ERC7579 reference implementation].
387387
*
388388
* This is not standardized in ERC-7579 (or in any follow-up ERC). Some accounts may want to override these internal functions.
389+
*
390+
* NOTE: This function expects the signature to be at least 20 bytes long. Panics with {Panic-ARRAY_OUT_OF_BOUNDS} (0x32) otherwise.
389391
*/
390392
function _extractSignatureValidator(
391393
bytes calldata signature
392394
) internal pure virtual returns (address module, bytes calldata innerSignature) {
393-
require(signature.length > 19, ERC7579InvalidModuleSignature());
394-
return (address(bytes20(signature)), signature[20:]);
395+
return (address(bytes20(signature[0:20])), signature[20:]);
395396
}
396397

397398
/**

0 commit comments

Comments
 (0)