Skip to content

Commit 79d50be

Browse files
committed
Null check
1 parent fb599ca commit 79d50be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/AuthorizationEngine.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,9 @@ public ActionRequestValidationException validate(ActionRequestValidationExceptio
368368
}
369369
if (index != null) {
370370
for (RoleDescriptor.IndicesPrivileges indexPrivilege : index) {
371-
if (Arrays.stream(indexPrivilege.getPrivileges())
372-
.anyMatch(p -> "read_failure_store".equals(p) || "manage_failure_store".equals(p))) {
371+
if (indexPrivilege.getPrivileges() != null
372+
&& Arrays.stream(indexPrivilege.getPrivileges())
373+
.anyMatch(p -> "read_failure_store".equals(p) || "manage_failure_store".equals(p))) {
373374
validationException = addValidationError("checking failure store privileges is not supported", validationException);
374375
}
375376
}

0 commit comments

Comments
 (0)