Normal Behavior:
When creating a new memorabilia collection using createMemorabiliaCollection, each collection should ideally have a unique name and baseUri to prevent confusion for users, off-chain indexers, and marketplaces. Unique identifiers help ensure that each collection is distinct and easily referenced.
Issue:
The createMemorabiliaCollection function in FestivalPass does not check for duplicate name or baseUri values. This means the organizer can accidentally or maliciously create multiple collections with the same name or URI. This can lead to confusion for users, difficulties for off-chain services (such as NFT explorers or indexers), and potential issues with collection management or provenance.
Likelihood:
This can occur if the organizer reuses a name or URI by mistake or intentionally.
Impact:
While this does not break contract logic, it can cause confusion for users and off-chain systems, and may affect the perceived uniqueness and provenance of memorabilia collections.
An organizer can create two memorabilia collections with the same name and baseUri by calling createMemorabiliaCollection twice with identical parameters. Both calls succeed, resulting in two distinct collections that are indistinguishable by name or URI. This can confuse users, off-chain indexers, and marketplaces, as there is no enforced uniqueness for these identifiers.
Add checks in createMemorabiliaCollection to ensure that both name and baseUri are unique among all existing collections. This can be done by maintaining mappings or iterating through existing collections (if gas usage is acceptable for the expected number of collections).
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.