Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Valid

isDivorced check in Airdrop contract will never be false

Summary

isDivorced check in Airdrop contract will never be false resulting in Divorced couples still allowed to claim their airdrops

Vulnerability Details

isDivorced function returns a boolean "true" if msg.sender is divorced, if the Airdrop.sol contract calls the function, it will read the state with the AirdropContract as the msg.sender, So it will always be false

function isDivorced() public view returns (bool) {
return divorced[msg.sender];
}

and if (soulmateContract.isDivorced()) revert Airdrop__CoupleIsDivorced();

Impact

Divorced couples can still claim their airdrops

Tools Used

Manual Review

Recommendations

use tx.origin or pass the msg.sender as a parameter

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

finding-isDivorced-wrong-check

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.