Puppy Raffle

AI First Flight #1
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

## [I-1] Invalid JSON Generated in `tokenURI()`

Root + Impact

Description

The tokenURI() function generates invalid JSON because the rareName value is not wrapped in quotes:

'"attributes": [{"trait_type": "rarity", "value": ',
@> rareName, // Inserted without quotes
'}], "image":"',

Risk

Likelihood:

This produces invalid JSON like:

{"attributes": [{"trait_type": "rarity", "value": common}]}

Instead of valid JSON:

{"attributes": [{"trait_type": "rarity", "value": "common"}]}

Proof of Concept

Recommended Mitigation

'"attributes": [{"trait_type": "rarity", "value": ',
- rareName,
+ '"', rareName, '"',
'}], "image":"',
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge 17 days ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!