Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3149

Failure to decrypt empty strings (AES 128)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Crypto, Parsing, PDModel
    • None

    Description

      SecurityHandler fails to decrypt empty strings in a AES 128 encrypted PDF.

      Strings like: <</Name ()>>

      This is because it tries to read the first 16 bytes as the AES IV, failing which it throws IOException. Solution: if you cannot read any bytes from the stream, it is empty and so there is nothing to decrypt.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tilman Tilman Hausherr
            jesselong Jesse Long
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment