Thomas Chojecki created PDFBOX-1593:
---------------------------------------
Summary: Adobe encrypted document doesn't parse correct (Adobe 5
and above compatibility)
Key: PDFBOX-1593
URL: https://issues.apache.org/jira/browse/PDFBOX-1593
Project: PDFBox
Issue Type: Bug
Components: Parsing
Affects Versions: 1.8.1
Reporter: Thomas Chojecki
Trying to parse and receive some information from encrypted documents created
with Adobe 9 with compatibility to Acrobat 9, cause an error while decrypting
informations.
I tested documents with follow compatibility:
Acrobat 3 (40-bit RC4) -> works
Acrobat 5 & 6 (128-bit RC4) -> work
Acrobat 7 (128-bit AES) -> work
Acrobat 9 (256-bit AES) -> doesn't work
The follow error will be thrown.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeEncryptedKey(StandardSecurityHandler.java:591)
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeUserPassword(StandardSecurityHandler.java:628)
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.isUserPassword(StandardSecurityHandler.java:812)
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareForDecryption(StandardSecurityHandler.java:213)
at
org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.decryptDocument(StandardSecurityHandler.java:154)
at
org.apache.pdfbox.pdmodel.PDDocument.openProtection(PDDocument.java:1509)
at org.apache.pdfbox.pdmodel.PDDocument.decrypt(PDDocument.java:919)
at de.bos_bremen.pdftoolbox.testing.Test.main(Test.java:45)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira