Skip to content

Domain separator is miscalculated when delegatecalled #415

@Shungy

Description

@Shungy

There should be a check here comparing cached address(this) against the address(this) of the current context. If the compared addresses don't match, it should recalculate the domain separator:

return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();

Currently any delegatecalls will result in incorrect domain separator due to the difference in the actual address of the context and the address when the domain separator was cached.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions