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

While deleting the name of beneficiary , the _setDeadline()function is not called.

Summary

In the contract InheritanceManager.sol , while the owner is deleting the name of beneficiary , the time is reset to 90 days.

Every transaction the owner does with the contract must reset it to 90 days.

Vulnerability Details

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

Impact

If the _setDeadline() function is not called , then all the names of beneficiary is deleted within 90 days.

Tools Used

Recommendations

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

Lead Judging Commences

0xtimefliez Lead Judge 4 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.