Mystery Box

First Flight #25
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing checks for `address(0)` when assigning values to address state variables

Summary

In the changeOwner function, there is no verification for the zero address.

Vulnerability Details

Is possible to assigne address of the Protocol's owner to 0 address.

function changeOwner(address _newOwner) public {
owner = _newOwner;
}

Impact

It can break protocol.

Tools Used

aderyn

Recommendations

Check for address(0) when assigning values to address state variables.

error MysteryBox_ZeroAddress();
function changeOwner(address _newOwner) public {
require(address(0) != _newOwner, MysteryBox_ZeroAddress());
owner = _newOwner;
}
Updates

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!