Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: medium
Invalid

Possible to update "message" even if divorced

Summary

writeMessageInSharedSpace() allows soulmates to write messages to each other.

Vulnerability Details

There is no check if the soulmates are divorced or not.

Impact

Soulmates can call writeMessageInSharedSpace() even if they are divorced

function test_divorcedCanWriteMessage() public {
_mintOneTokenForBothSoulmates();
vm.startPrank(soulmate1);
soulmateContract.getDivorced();
soulmateContract.writeMessageInSharedSpace("hellow");
}

Tools Used

manual review

Recommendations

It's recommended to ad a check like below to writeMessageInSharedSpace() function:

if (isDivorced()) revert revert Soulmate__coupleDivorced();
Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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