Christopher Schütte commented on PDFBOX-2233:

Tried to upgrade to PDFBox 2.0.3 to get the PreflightParser working without 
creating a temp file. PDFBox now has support for parsing without tempfile, but 
Preflight is still working the old way. We want to use Preflight in a sandbox 
environment where it is unhandy to create files. Can you reopen this issue? 
Maybe it was not a good idea to close it that fast.

> Make PreflightParser sandbox safe (RandomAccessRead)
> ----------------------------------------------------
>                 Key: PDFBOX-2233
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2233
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Parsing, Preflight
>    Affects Versions: 2.0.0
>            Reporter: simon steiner
>         Attachments: avoidtmpfile.patch
> It should be possible to pass a DataSource into PreflightParser without a 
> temp file being created. Temp file is being created in NonSequentialPDFParser 
> causing a SecurityException.
> java.lang.SecurityException: Unable to create temporary file
>       at java.io.File.createTempFile(File.java:2018)
>       at java.io.File.createTempFile(File.java:2070)
>       at 
> org.apache.pdfbox.pdfparser.NonSequentialPDFParser.createTmpFile(NonSequentialPDFParser.java:281)
>       at 
> org.apache.pdfbox.pdfparser.NonSequentialPDFParser.<init>(NonSequentialPDFParser.java:261)
>       at 
> org.apache.pdfbox.pdfparser.NonSequentialPDFParser.<init>(NonSequentialPDFParser.java:247)
>       at 
> org.apache.pdfbox.preflight.parser.PreflightParser.<init>(PreflightParser.java:125)

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to