An attester added multiple times is not removed by a single call to RegistryFactory.removeAttester.
The function RegistryFactory.addAttester allows an owner to add an attester. However, there is not check to prevent adding an attester multiple times, even if it's already in the list attesters. This means, if an address is added X times, in order to remove it, the function RegistryFactory.removeAttester should be called X times as well.
The issue occur because RegistryFactory.addAttester does not check for duplicate entries and because RegistryFactory.removeAttester removes only the first occurrence found and there are no events or other checks that let the owner prevent such case from happening.
Relevant code:
Add the same address twice in the following unit-test and the test will fail with message "Attester should be removed":
This could lead to unexpected behaviours since the owner should remember how many times an attester is added to remove it properly. Also, if an address X is added multiple times and the owner calls RegistryFactory.removeAttester only once to remove the address X, this could lead the owner to think that the address was indeed removed while it is not.
Finally, in the case of duplicate addresses, this will increase the cost of removing the same address by calling RegistryFactory.removeAttester multiple times.
Manual code review
Consider using a map to keep track of attesters or use an approach similar to what already used for validators or executors in AccountStorage.
Invalid, - Addition of attesters are admin only functionalities so if duplicate addresses are added it would consitute admin input/call validation. - ERC-7484 is in draft mode so we should not take it as the final EIP configuration yet. - Even if a mistake was made, removals can be performed by invoking `removeAttester` multiple times by the owner to completely remove a duplicate user. - In the [documentation](https://github.com/bcnmy/nexus/wiki#problems-nexus-solves), it is not noted that Nexus suite will be ERC7484 compliant.
Invalid, similar issue to #151 and duplicates - Addition of attesters are admin only functionalities so if duplicate addresses are added it would consitute admin input/call validation. - ERC-7484 is in draft mode so we should not take it as the final EIP configuration yet. - In the [documentation](https://github.com/bcnmy/nexus/wiki#problems-nexus-solves), it is not noted that Nexus suite will be ERC7484 compliant.
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.