You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/07/25 23:04:40 UTC

[jira] [Comment Edited] (PDFBOX-2233) Make PreflightParser sandbox safe

    [ https://issues.apache.org/jira/browse/PDFBOX-2233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14074907#comment-14074907 ] 

John Hewson edited comment on PDFBOX-2233 at 7/25/14 9:04 PM:
--------------------------------------------------------------

{quote}
files don't have to be cached in full
{quote}

Are you sure? Doesn't NonSequentialPDFParser require random access?


was (Author: jahewson):
{quote}
files don't have to be cached in full
{quote}

Are you sure? Isn't NonSequentialPDFParser random access?

> Make PreflightParser sandbox safe
> ---------------------------------
>
>                 Key: PDFBOX-2233
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2233
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: 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
(v6.2#6252)