GivingThanks

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

lacks a zero-check for CharityRegistry::changeAdmin

Summary

The address 0 has not been checked in the changeAdmin() function. If the address 0 is sent, it will be considered as the admin and the admin can no longer be changed.

Vulnerability Details

There will be a lack of access to the parts that the admin can do, and the program will be without an admin

Impact

Tools Used

personal Information

Recommendations

function changeAdmin(address newAdmin) public {
+ require(newAdmin!=address(0));
require(msg.sender == admin, "Only admin can change admin");
admin = newAdmin;
}
Updates

Lead Judging Commences

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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