The contract allows to specify the profileImage when calling the mintProfilefunction.
The function allows special JSON characters to be sent as part of the profileImageparameter.
This breaks the JSON response when the tokenURIis called.
The following has been added to the existing SoulboundProfileNFTTest.
When calling tokenURIfor this particular case, the resulting base64 decoded JSON is the following, which is invalid:
If the profile pictures URIs are consumed by an API, the resulting JSON is be corrupted, breaking the API or web application logic, disallowing to view the accounts' profiles.
Foundry
Ensure that the profileImage string does not exceed a certan length. Then, ensure that the string does not contain any double quote characters that could break the JSON when the tokenURIfunction is called.
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.
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.