Return-Path: X-Original-To: apmail-pdfbox-dev-archive@www.apache.org Delivered-To: apmail-pdfbox-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9DC518F9A for ; Wed, 2 Dec 2015 21:23:16 +0000 (UTC) Received: (qmail 51069 invoked by uid 500); 2 Dec 2015 21:23:11 -0000 Delivered-To: apmail-pdfbox-dev-archive@pdfbox.apache.org Received: (qmail 51019 invoked by uid 500); 2 Dec 2015 21:23:11 -0000 Mailing-List: contact dev-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list dev@pdfbox.apache.org Received: (qmail 50977 invoked by uid 99); 2 Dec 2015 21:23:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Dec 2015 21:23:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id F25822C1F6E for ; Wed, 2 Dec 2015 21:23:10 +0000 (UTC) Date: Wed, 2 Dec 2015 21:23:10 +0000 (UTC) From: "Tilman Hausherr (JIRA)" To: dev@pdfbox.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (PDFBOX-3149) Failure to decrypt empty strings (AES 128) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PDFBOX-3149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15036657#comment-15036657 ] Tilman Hausherr edited comment on PDFBOX-3149 at 12/2/15 9:22 PM: ------------------------------------------------------------------ encrypted file with an empty string in object 7, password is abcdefghijk1234567890abcdefghijk1234567890, and it can be opened with PDFDebugger without any trouble. was (Author: tilman): encrypted file with an empty string in object 7, password is abcdefghijk1234567890abcdefghijk1234567890 > Failure to decrypt empty strings (AES 128) > ------------------------------------------ > > Key: PDFBOX-3149 > URL: https://issues.apache.org/jira/browse/PDFBOX-3149 > Project: PDFBox > Issue Type: Bug > Components: Crypto, Parsing, PDModel > Affects Versions: 2.0.0 > Reporter: Jesse Long > Assignee: Tilman Hausherr > Priority: Minor > Attachments: PDFBOX-3149.patch, Simple-128-bit-encrypted.pdf > > > SecurityHandler fails to decrypt empty strings in a AES 128 encrypted PDF. > Strings like: <> > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional commands, e-mail: dev-help@pdfbox.apache.org