AccessControlEnumerable
doesn't override all internal functions
#2938
Labels
AccessControlEnumerable
doesn't override all internal functions
#2938
Background
AccessControlEnumerable
inherits fromAccessControl
. It overrides some public methods, but not all internal ones. For example not this oneopenzeppelin-contracts/contracts/access/AccessControl.sol
Lines 205 to 210 in ee14987
Vulnerability scenario
Alice is writing a contract C. I've provided mocks for the two OZ contracts to illustrate the scenario:
C.getRoleMemberCount(hex"deadbeef")
will return 0.Recommendation
Short term, override the internal methods of
AccessControlEnumerable
. This will ensure the above code behaves as expected.Long term, remove the dependency of
AccessControlEnumerable
onAccessControl
.AddressSet
has methods to get enumeration and inclusion, so there is no need for such redundancy.The text was updated successfully, but these errors were encountered: