The mintProfile
function in SoulBondProfileNFT.sol does not validate the inputs for name
, age
, and profileImage
. This could lead to:
Empty or invalid name
values.
Invalid age
values (e.g., 0
or unrealistic values like 200
).
Malformed or non-existent profileImage
URLs.
Users can mint profiles with invalid or nonsensical data.
The contract may store garbage data on-chain, wasting gas and storage.
add validation for name ,age and profileImage:
require(bytes(name).length > 0, "Name cannot be empty");
require(age > 0 && age < 150, "Invalid age");
require(bytes(profileImage).length > 0, "Profile image URL cannot be empty");
the update function will look like this:
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.