Skip to content

Commit

Permalink
📝 plugin: document y == 0 edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed May 16, 2024
1 parent a8eb81d commit 986729d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/WebauthnOwnerPlugin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ contract WebauthnOwnerPlugin is BasePlugin, IWebauthnOwnerPlugin, IERC1271 {
return keccak256(abi.encode(_TYPE_HASH, _NAME_HASH, _VERSION_HASH, block.chainid, account, _SALT));
}

/// @dev Webauthn public keys with `y` as 0 are not supported, as they will be treated as Ethereum addresses.
function _validateSignature(address account, bytes32 message, bytes calldata signature) internal view returns (bool) {
SignatureWrapper memory sigWrapper = abi.decode(signature, (SignatureWrapper));
PublicKey memory owner = _owners[account].get(sigWrapper.ownerIndex);
Expand Down

0 comments on commit 986729d

Please sign in to comment.