Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Invalid

Sending native Eth is not protected from these functions.

Introduce Checks for msg.sender in the Function

1 Found Instances

  • Found in src/InheritanceManager.sol Line: 236

    function withdrawInheritedFunds(address _asset) external {

Recommended Fix

Introduce a check for msg.sender to ensure only authorized users can execute the function.

Updated Code:

function withdrawInheritedFunds(address _asset) external {
require(isAuthorized(msg.sender), "Unauthorized access");
// Function logic
}

Explanation

  • require(isAuthorized(msg.sender), "Unauthorized access"); ensures only authorized users can call the function.

  • isAuthorized should be implemented to verify whether msg.sender is allowed to withdraw funds.

This fix helps prevent unauthorized access and strengthens the security of the contract.

Updates

Lead Judging Commences

0xtimefliez Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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