The KittyConnect::addShop
function does not check if the shop address being added already exists as a partner. This could allow duplicate shop partners to be added.
When adding a new shop partner, KittyConnect::addShop
only checks that msg.sender
is the contract owner. It does not check if the shop address passed in already exists in the s_kittyShops
array. This could allow an existing shop to be added again as a duplicate partner.
Allowing duplicate shop partners could clutter the storage of the contract and cost more gas for functions that loop through the shops. It also distorts the data by showing duplicate entries.
Manual Review
Before adding a new shop partner, check that it does not already exist:
This will prevent duplicate shops being added and keep the data clean.
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.