You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/entitlements/FilesEntitlement.java
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -237,17 +237,15 @@ public static FilesEntitlement build(List<Object> paths) {
237
237
thrownewPolicyValidationException("files entitlement with a 'relative_path' must specify 'relative_to'");
238
238
}
239
239
240
-
PathrelativePath = Path.of(relativePathAsString);
241
-
if (relativePath.isAbsolute()) {
240
+
if (FileData.isAbsolutePath(relativePathAsString)) {
242
241
thrownewPolicyValidationException("'relative_path' [" + relativePathAsString + "] must be relative");
Copy file name to clipboardExpand all lines: libs/entitlement/src/test/java/org/elasticsearch/entitlement/runtime/policy/entitlements/FilesEntitlementTests.java
+25-1Lines changed: 25 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -60,12 +60,36 @@ public void testInvalidRelativeDirectory() {
60
60
assertThat(ex.getMessage(), is("invalid relative directory: bar, valid values: [config, data, home]"));
0 commit comments