Weather Witness

First Flight #40
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Typo in deployed contract `NFT` naming, visible in JSON blob data

Root + Impact

Description

  • Typo in src file WeatherNft.sol

  • "Weathear NFT""Weather NFT" in function tokenURI

function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
_requireOwned(tokenId);
string memory image = s_weatherToTokenURI[s_tokenIdToWeather[tokenId]];
bytes memory jsonData = abi.encodePacked(
'{"name": "Weathear NFT", "user": "',
Strings.toHexString(_ownerOf(tokenId)),
'", "image": "',
image,
'"}'
);
string memory base64TransformedData = Base64.encode(jsonData);
return string.concat(_baseURI(), base64TransformedData);
}

Risk

Likelihood:

  • Low: would make a good observation to fix the ambigous name

Impact:

  • Ambiguity in NFT naming → Weather NFT

Proof of Concept

// Fix the errata -
// See #recommended-mitigation

Recommended Mitigation

- '{"name": "Weathear NFT", "user": "',
+ '{"name": "Weather NFT", "user": "',
Updates

Appeal created

bube Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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