Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

The `InheritanceManager::removeBeneficiary` function does not reset deadline after being called

Summary

When the owner calls the InheritanceManager::removeBeneficiaryfunction the deadlineis not reset making it possible for funds to be claimed by beneficiaries before the deadline passes.

Vulnerability Details

Because the deadlineis not reset in this function it's possible to claim funds before the intended deadlinepasses.

Tools Used

Manual code review

Recommendations

Reset the deadline in the removeBeneficiaryfunction:

function removeBeneficiary(address _beneficiary) external onlyOwner {
uint256 indexToRemove = _getBeneficiaryIndex(_beneficiary);
delete beneficiaries[indexToRemove];
+ _setDeadline()
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 3 months ago
Submission Judgement Published
Validated
Assigned finding tags:

functions do not reset the deadline

Support

FAQs

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