Mystery Box

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

MysteryBox::changeOwner lacks a zero check

Summary :

In changeOwner the function changes the Owner without verifying if the new owner is a valid wich can drain the Box.

Vulnerability Details :

if the sender of the transaction send the box an invalid address, the box will be drained.

Impact :

If there's a mistake in the adress during the transfer the box could be drained or lost.

Recommendations :

add a cheker for the addres(0)

function changeOwner(address _newOwner) public {
if (_newOwner != address(0)) {
owner = _newOwner;
} else {
revert();
}
}
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!