poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58597] New: XWPFDocument causes SecurityException under securitymanager
Date Sat, 07 Nov 2015 23:06:01 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58597

            Bug ID: 58597
           Summary: XWPFDocument causes SecurityException under
                    securitymanager
           Product: POI
           Version: 3.13-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XWPF
          Assignee: dev@poi.apache.org
          Reporter: rmuir@apache.org

When running under securitymanager, this calls setAccessible() to violate
access rules, and will lead to an exception like this:

   > Throwable #1: org.apache.tika.exception.TikaException: Unexpected
RuntimeException from
org.apache.tika.parser.microsoft.ooxml.OOXMLParser@38ba0fca
   >     at
__randomizedtesting.SeedInfo.seed([30F5D02182B6C2A6:BD8A17A749023F4A]:0)
   >     at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:282)
   >     at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
   >     at
org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
   >     at org.apache.tika.Tika.parseToString(Tika.java:537)
   >     at
org.elasticsearch.mapper.attachments.AttachmentMapper$1.run(AttachmentMapper.java:624)
   >     at
org.elasticsearch.mapper.attachments.AttachmentMapper$1.run(AttachmentMapper.java:621)
   >     at java.security.AccessController.doPrivileged(Native Method)
   >     at
org.elasticsearch.mapper.attachments.AttachmentMapper.parseWithTika(AttachmentMapper.java:621)
   >     at
org.elasticsearch.mapper.attachments.VariousDocTests.assertParseable(VariousDocTests.java:127)
   >     at
org.elasticsearch.mapper.attachments.VariousDocTests.testWordDocxDocument104(VariousDocTests.java:62)
   >     at java.lang.Thread.run(Thread.java:745)
   > Caused by: org.apache.poi.POIXMLException:
java.security.AccessControlException: access denied
("java.lang.reflect.ReflectPermission" "suppressAccessChecks")
   >     at
org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:231)
   >     at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:177)
   >     at
org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:119)
   >     at
org.apache.poi.xwpf.extractor.XWPFWordExtractor.<init>(XWPFWordExtractor.java:58)
   >     at
org.apache.poi.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:204)
   >     at
org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:86)
   >     at
org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
   >     at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
   >     ... 46 more
   > Caused by: java.security.AccessControlException: access denied
("java.lang.reflect.ReflectPermission" "suppressAccessChecks")
   >     at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
   >     at
java.security.AccessController.checkPermission(AccessController.java:884)
   >     at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
   >     at
java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:128)
   >     at
org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:228)
   >     ... 53 more


Can this be avoided somehow? Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message