Submitted by MiloTruck, also found by juancito
In LensHub.sol, the second parameter of setProfileMetadataURIWithSig() is declared as metadataURI:
LensHub.sol#L119-L123
However, its EIP-712 typehash stores the parameter as metadata instead:
Typehash.sol#L33
The PostParams struct (which is used for postWithSig()) has address[] actionModules and bytes[] actionModulesInitDatas as its third and fourth fields:
Types.sol#L178-L185
However, the third and fourth fields in its typehash are declared as address collectModule and bytes collectModuleInitData instead:
Typehash.sol#L23
This occurs for the commentWithSig() and quoteWithSig() functions as well:
Typehash.sol#L25
Typehash.sol#L15
The fourth and fifth fields in the MirrorParams struct (which is used for mirrorWithSig()) are declared as referrerProfileIds and referrerPubIds:
Types.sol#L282-L289
However, its EIP-712 typehash declares these fields as referrerProfileId and referrerPubId instead:
Typehash.sol#L21
Due to the use of incorrect typehashes, the signature verification in the functions listed above is not EIP-712 compliant.
Contracts or dapps/backends that use correct typehashes that match the parameters of these functions will end up generating different signatures, causing them to revert when called.
Amend the typehashes shown above to have matching parameters with their respective functions.
Error
donosonaumczuk (Lens) disagreed with severity and commented:
Picodes (judge) commented:
