Bridge::getWhiteListedCollections(...)
will return an array with blank items if the collection contains non whitelisted elements, the problem is that if the length of the array is used anywhere in the contract then the wrong value will be returned for whitelisted collections
As shown in the code below,
on L318 the ret
array has a fixed length (nbElem
) of all the collections whether or not they are whitelisted and
on L322, only white listed collections are added to the ret
array which is returned by the function
Assume
6 collections
only 3 whitelisted
ret.length
= 6 but there are only 3 whitelisted collections
If an external contract uses this array it could return unpredictable results due to the problematic implemtation
Manual review
Implement the function to return the correct whitelisted collection array.
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.