pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-3756) javax.crypto.BadPaddingException: Given final block not properly padded
Date Thu, 13 Jun 2019 17:08:00 GMT

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

Tilman Hausherr commented on PDFBOX-3756:
-----------------------------------------

Parse on demand is now available in PDFBOX-4569 thanks to Andreas. 


> javax.crypto.BadPaddingException: Given final block not properly padded
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-3756
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3756
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Crypto
>    Affects Versions: 2.0.5
>         Environment: java version "1.8.0_112"
> Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
> Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
>            Reporter: Esteban Nicolas Ruiz
>            Priority: Major
>              Labels: crypto
>         Attachments: pdfdebugger.png
>
>
> I get the following stack trace when running:
> java -jar pdfbox-app-2.0.5.jar PDFDebugger somefile.pdf
> File is properly opened with other viewers, I cannot publish the pdf file due to privacy
restrictions.
> java.io.IOException: javax.crypto.BadPaddingException: Given final block not properly
padded
>     org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptDataAESother(SecurityHandler.java:296)
>     org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptData(SecurityHandler.java:153)
>     org.apache.pdfbox.pdmodel.encryption.SecurityHandler.decryptStream(SecurityHandler.java:454)
>     org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:790)
>     org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:747)
>     org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:678)
>     org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:638)
>     org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:236)
>     org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:271)
>     org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:984)
>     org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:922)
>     org.apache.pdfbox.debugger.PDFDebugger.parseDocument(PDFDebugger.java:1288)
>     org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1209)
>     org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1194)
>     org.apache.pdfbox.debugger.PDFDebugger.main(PDFDebugger.java:1185)
>     org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:76)
> Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
>     com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:989)
>     com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:845)
>     com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
>     javax.crypto.Cipher.doFinal(Cipher.java:2048)
>     org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptDataAESother(SecurityHandler.java:276)
>     org.apache.pdfbox.pdmodel.encryption.SecurityHandler.encryptData(SecurityHandler.java:153)
>     org.apache.pdfbox.pdmodel.encryption.SecurityHandler.decryptStream(SecurityHandler.java:454)
>     org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:790)
>     org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:747)
>     org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:678)
>     org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:638)
>     org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:236)
>     org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:271)
>     org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:984)
>     org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:922)
>     org.apache.pdfbox.debugger.PDFDebugger.parseDocument(PDFDebugger.java:1288)
>     org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1209)
>     org.apache.pdfbox.debugger.PDFDebugger.readPDFFile(PDFDebugger.java:1194)
>     org.apache.pdfbox.debugger.PDFDebugger.main(PDFDebugger.java:1185)
>     org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:76)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message