Soulmate::getDivorced
require statement is missing, working even for non soulmatesDescription: The getDivorced
function lacks proper access control and a require statement, allowing any account to call it without restrictions.
Impact: The absence of access control and proper validation in the getDivorced
function could lead to unauthorized parties initiating divorce proceedings, resulting in undesired outcomes and inconsistency in the relationship status. This could potentially disrupt the integrity of the relationship system and cause confusion among users.
Proof of Concept:
Past this code in SoulmateTest.t.sol
Recommended Mitigation:
Access Control: Implement access control mechanisms such as modifiers or access control lists (ACLs) to restrict the execution of the getDivorced function to authorized parties only.
Validation: Add validation checks to ensure that only valid soulmates can initiate divorce proceedings. This could involve verifying that the caller is indeed in a valid relationship with the specified soulmate before allowing the divorce to proceed.
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.