Closed code423n4 closed 2 years ago
gzeon
Duplicated entries can be added into operators array. This may lead to unexpected behavior when trying to call removeOperator as it will only remove the first entry.
removeOperator
https://github.com/code-423n4/2021-11-nested/blob/f646002b692ca5fa3631acfff87dda897541cf41/contracts/NestedFactory.sol#L75
Check if operator already exists in addOperator
addOperator
Duplicated : #180
Handle
gzeon
Vulnerability details
Impact
Duplicated entries can be added into operators array. This may lead to unexpected behavior when trying to call
removeOperator
as it will only remove the first entry.Proof of Concept
https://github.com/code-423n4/2021-11-nested/blob/f646002b692ca5fa3631acfff87dda897541cf41/contracts/NestedFactory.sol#L75
Recommended Mitigation Steps
Check if operator already exists in
addOperator