DatingDapp

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

Improper Formatting of Token URI

Description

The SoulboundProfileNFT::tokenURI function relies on _baseURI(), but _baseURI() is not set, leading to the metadata being returned as an encoded JSON string without a proper base URI. Since _baseURI() is not set, it defaults to an empty string, making the metadata URI malformed.

Impact

The metadata returned for the NFTs is incomplete or invalid, which may cause issues with the DatingDapp and wallets displaying the profile data incorrectly.

Tools Used

Manual Review

Recommendations

Override _baseURI() to return a valid base URI:

function _baseURI() internal view override returns (string memory) {
return "data:application/json;base64,";
}

This ensures that the token metadata is correctly formatted and properly encoded.

Updates

Appeal created

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

invalid_baseURI_not_override

`_baseURI` can remains empty, the token URI will have a valid JSON. Rest can be handled in the app interface.

Support

FAQs

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