DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

LikeRegistry: Zero Address Validation Missing

[High] LikeRegistry: Zero Address Validation Missing

Liked address can be zero address, potentially leading to locked funds. if user cannot find a match funds will be locked. it should not accept deposit if one of the params is incorrect.

Impact: Funds could be locked in the contract if zero address is used for liked.

Proof of Concept:

function likeUser(address liked) external payable {
// Missing zero address check
likes[msg.sender][liked] = true;
}

Recommended Mitigation: Add zero address check:

require(liked != address(0), "Cannot like zero address");
Updates

Appeal created

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

Users mistake, only impacting themselves.

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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