[
https://issues.apache.org/jira/browse/PDFBOX-2586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14299729#comment-14299729
]
Michele Balistreri commented on PDFBOX-2586:
--------------------------------------------
This happens because in Java 1.8.0u25 Oracle change the behavior of
CipherInputStream. It used to swallow GeneralSecurityException, which was quite
convenient for handling badly formatted PDF. Now it throws an IOException
instead. Attached is a patch to catch and ignore this kind of exception, which
makes the test document work again.
> IllegalBlockSizeException: Input length must be multiple of 16 when
> decrypting with padded cipher
> -------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-2586
> URL: https://issues.apache.org/jira/browse/PDFBOX-2586
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.0
> Reporter: simon steiner
> Attachments: SecurityHandler.patch, test.pdf
>
>
> On java version "1.7.0_72", java version "1.8.0_20" works ok
> java -jar ~/pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar PDFToImage
> test.pdf
> Exception in thread "main" java.io.IOException:
> javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16
> when decrypting with padded cipher
> at
> javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:115)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]