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

Failure to decrypt empty strings (AES 128)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Crypto, Parsing, PDModel
    • Labels:
      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: