The Soulmate.sol::getDivorced function does not check if the caller is in a couple.
This means that if a "single" soulmate calls getDivorced
, she will be marked as divorced
. (from address 0
to be precise)
A user can "shoot herself in the foot", perhaps unintentional. Since this is irreversible, it can be quite annoying.
Please paste this test at the bottom in SoulmateTest.t.sol
and run: forge test --mt test_singleSoulmateCanGetDivorced -vvvvv
Add a require to check if a user is in a couple:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.