Skip to content

Commit 97a770a

Browse files
authored
Fixing ZNodeGroupAclProvider matches implementation for NPE for connection object (#69)
Co-authored-by: Rahul Rane <[email protected]>
1 parent 405b055 commit 97a770a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

zookeeper-server/src/main/java/org/apache/zookeeper/server/auth/znode/groupacl/X509ZNodeGroupAclProvider.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,9 @@ public KeeperException.Code handleAuthentication(ServerObjs serverObjs, byte[] a
118118

119119
@Override
120120
public boolean matches(ServerObjs serverObjs, MatchValues matchValues) {
121-
for (Id id : serverObjs.getCnxn().getAuthInfo()) {
122-
// Not checking for super user here because the check is already covered
123-
// in checkAcl() in ZookeeperServer.class
124-
if (id.getId().equals(matchValues.getAclExpr())) {
125-
return true;
126-
}
127-
}
128-
return false;
121+
// Not checking for super user here because the check is already covered
122+
// in checkAcl() in ZookeeperServer.class
123+
return matchValues.getId().equals(matchValues.getAclExpr());
129124
}
130125

131126
@Override

0 commit comments

Comments
 (0)