Description:Description\
An attacker can bypass the onlyRelayer modifier with an address that is not a relayer because the modifier doesn't revert if relayersWhitelistEnabled is false and if !relayers[msg.sender]. It's only revert if relayersWhitelistEnabled is true and !relayers[msg.sender].
Attack Scenario\
The owner calls toggleRelayersWhitelistEnabled and set relayersWhitelistEnabled to false.
The attacker can bypass the onlyRelayer modifier with an address that is not a relayer. He can therefore call functions that use the modifier.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x89233d417492fd61fba4a61c8d49d18d35f6cb508159a56d4e433d1475f33025 Severity: medium
Description: Description\ An attacker can bypass the onlyRelayer modifier with an address that is not a relayer because the modifier doesn't revert if relayersWhitelistEnabled is false and if !relayers[msg.sender]. It's only revert if relayersWhitelistEnabled is true and !relayers[msg.sender].
Attack Scenario\
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
You must make these changes on the modifier: