Add getClassLoader perm for tika in ingest

This commit is contained in:
Ryan Ernst 2016-03-10 11:17:25 -08:00
parent 6deabac8e8
commit 51d87d94dc
3 changed files with 5 additions and 1 deletions

View File

@ -137,6 +137,8 @@ final class TikaImpl {
perms.add(new SecurityPermission("putProviderProperty.BC"));
perms.add(new SecurityPermission("insertProvider"));
perms.add(new ReflectPermission("suppressAccessChecks"));
// xmlbeans, use by POI, needs to get the context classloader
perms.add(new RuntimePermission("getClassLoader"));
perms.setReadOnly();
return perms;
}

View File

@ -27,4 +27,6 @@ grant {
permission java.security.SecurityPermission "insertProvider";
// TODO: fix POI XWPF to not do this: https://bz.apache.org/bugzilla/show_bug.cgi?id=58597
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
// needed by xmlbeans, as part of POI for MS xml docs
permission java.lang.RuntimePermission "getClassLoader";
};

View File

@ -73,7 +73,7 @@
- match: { _source.attachment.content: "Test elasticsearch" }
- match: { _source.attachment.language: "et" }
- match: { _source.attachment.author: "David Pilato" }
- match: { _source.attachment.date: "2016-03-10T08:25:00Z" }
- match: { _source.attachment.date: "2016-03-10T08:24:00Z" }
- match: { _source.attachment.content_length: "19" }
- match: { _source.attachment.content_type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }