java.io.IOException: The file appears to be potentially malicious. This file embeds more internal file entries than expected.
This may indicates that the file could pose a security risk.
You can adjust this limit via ZipSecureFile.setMaxFileCount() if you need to work with files which are very large.
Limits: MAX_FILE_COUNT: 1000
at org.apache.poi.openxml4j.util.ZipArchiveThresholdInputStream.getNextEntry(ZipArchiveThresholdInputStream.java:153)
at org.apache.poi.openxml4j.util.ZipInputStreamZipEntrySource.<init>(ZipInputStreamZipEntrySource.java:94)
at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:133)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:319)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.create(XSSFWorkbookFactory.java:97)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.create(XSSFWorkbookFactory.java:36)
at org.apache.poi.ss.usermodel.WorkbookFactory.lambda$create$2(WorkbookFactory.java:224)
at org.apache.poi.ss.usermodel.WorkbookFactory.wp(WorkbookFactory.java:329)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:224)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:185)
at dk.ative.docjure.spreadsheet$load_workbook_from_stream.invokeStatic(spreadsheet.clj:83)
at dk.ative.docjure.spreadsheet$load_workbook_from_stream.invoke(spreadsheet.clj:79)
at dk.ative.docjure.spreadsheet$fn__11339.invokeStatic(spreadsheet.clj:114)
at dk.ative.docjure.spreadsheet$fn__11339.invoke(spreadsheet.clj:112)
at clojure.lang.MultiFn.invoke(MultiFn.java:229)
The excel file in quesiton is indeed huge with lots of images in it - but it's not malicious.
I call docjure like this: (spreadsheet/load-workbook (io/input-stream filename))
I assume that this is due to some new thing in POI.
The error message does explain quite clearly what to do - but I have no idea where I'm supposed to call setMaxFileCount when this is done through docjure.
Appreciate any help!
The excel file in quesiton is indeed huge with lots of images in it - but it's not malicious.
I call docjure like this:
(spreadsheet/load-workbook (io/input-stream filename))I assume that this is due to some new thing in POI.
The error message does explain quite clearly what to do - but I have no idea where I'm supposed to call setMaxFileCount when this is done through docjure.
Appreciate any help!