You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Jira)" <ji...@apache.org> on 2021/12/16 07:10:00 UTC

[jira] [Commented] (PDFBOX-5345) IllegalArgumentException: Input buffer too short in StandardSecurityHandler.computeRC4key

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

Andreas Lehmkühler commented on PDFBOX-5345:
--------------------------------------------

Looks like PDFBOX-5312 adds a missing length value and replaces existing ones as well at least for AESV2 and AESV3. We shouldn't do the latter even if those values don't comply with the spec. And yes, that fixes this issue ;)

> IllegalArgumentException: Input buffer too short in StandardSecurityHandler.computeRC4key
> -----------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-5345
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5345
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Crypto
>    Affects Versions: 2.0.24
>            Reporter: Tilman Hausherr
>            Priority: Minor
>              Labels: regression
>         Attachments: poppler-89422-0.pdf
>
>
> {noformat}
> java.lang.IllegalArgumentException: Input buffer too short
>         at java.base/java.security.MessageDigest.update(MessageDigest.java:347)
>         at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeRC4key(StandardSecurityHandler.java:894)
>         at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.getUserPassword(StandardSecurityHandler.java:617)
>         at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.isOwnerPassword(StandardSecurityHandler.java:595)
>         at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareForDecryption(StandardSecurityHandler.java:213)
>         at org.apache.pdfbox.pdfparser.COSParser.prepareDecryption(COSParser.java:2532)
> {noformat}
> Probably because of PDFBOX-5312



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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