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

Failure to decrypt empty strings (AES 128)

    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

        1. PDFBOX-3149.patch
          1 kB
          Jesse Long

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: