DatingDapp

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

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

Summary

Check for `address(0)` when assigning values to address state variables.
<details><summary>1 Found Instances</summary>
- Found in src/LikeRegistry.sol [Line: 29]()
```solidity
profileNFT = SoulboundProfileNFT(_profileNFT);
```
</details>

Impact

A Malicious user can deploy contract by passing zero address

Tools Used

slither

Recommendations

Add this check in `LikeRegistry` contract constructor.
```diff
constructor(address _profileNFT) Ownable(msg.sender){
+ require(_profileNFT != address(0), "Zero address can not passed");
profileNFT = SoulboundProfileNFT(_profileNFT);
}
```
Updates

Appeal created

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

Admin is trusted

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood 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.