Debian Bug report logs - #531529
pdftk needs owner password to handle DRM'd PDFs

version graph

Package: pdftk; Maintainer for pdftk is Johann Felix Soden <johfel@debian.org>; Source for pdftk is src:pdftk.

Reported by: James Y Knight <foom@fuhm.net>

Date: Tue, 2 Jun 2009 03:51:48 UTC

Severity: normal

Tags: confirmed, patch

Found in version pdftk/1.41-3

Fixed in version pdftk/1.44-4

Done: Johann Felix Soden <johfel@gmx.de>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Aurélien GÉRÔME <ag@debian.org>:
Bug#531529; Package pdftk. (Tue, 02 Jun 2009 03:51:50 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Y Knight <foom@fuhm.net>:
New Bug report received and forwarded. Copy sent to Aurélien GÉRÔME <ag@debian.org>. (Tue, 02 Jun 2009 03:52:18 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: James Y Knight <foom@fuhm.net>
To: submit@bugs.debian.org
Subject: pdftk refuses to work with DRM'd PDFs
Date: Mon, 1 Jun 2009 23:46:43 -0400
Package: pdftk
Version: 1.41-3

With a PDF which is encrypted and has an owner password set, but no  
user password (so I can view it in any other tool), it refuses to do  
anything unless you provide the owner password. There's no reason for  
it to do so, it just arbitrarily decides not to work.

This patch fixes it for me:

diff -ur pdftk-1.41/pdftk/pdftk.cc pdftk-1.41-2/pdftk/pdftk.cc
--- pdftk-1.41/pdftk/pdftk.cc   2006-11-28 17:51:36.000000000 -0500
+++ pdftk-1.41-2/pdftk/pdftk.cc 2009-06-01 23:43:24.000000000 -0400
@@ -191,7 +191,7 @@
                // store in this java object so the gc can trace it
                g_dont_collect_p->addElement( reader );

-               input_pdf_p->m_authorized_b= ( !reader->encrypted ||  
reader->passwordIsOwner );
+               input_pdf_p->m_authorized_b= true;
                if( !input_pdf_p->m_authorized_b ) {
                        open_success_b= false;
                }





Information forwarded to debian-bugs-dist@lists.debian.org, Johann Felix Soden <johfel@gmx.de>:
Bug#531529; Package pdftk. (Mon, 20 Dec 2010 05:27:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Y Knight <foom@fuhm.net>:
Extra info received and forwarded to list. Copy sent to Johann Felix Soden <johfel@gmx.de>. (Mon, 20 Dec 2010 05:27:06 GMT) Full text and rfc822 format available.

Message #10 received at 531529@bugs.debian.org (full text, mbox):

From: James Y Knight <foom@fuhm.net>
To: 531529@bugs.debian.org
Subject: Ping re: pdftk refuses to work with DRM'd PDFs
Date: Mon, 20 Dec 2010 00:05:31 -0500
Just wondering if this bug got lost...Can this patch be applied?

There's really no point in checking that the password entered was the "owner" password when the "user" password is entirely equivalent...

James



Changed Bug title to 'pdftk needs owner password to handle DRM'd PDFs' from 'pdftk refuses to work with DRM'd PDFs' Request was from Johann Felix Soden <johfel@gmx.de> to control@bugs.debian.org. (Mon, 20 Dec 2010 13:12:08 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Johann Felix Soden <johfel@gmx.de> to control@bugs.debian.org. (Mon, 20 Dec 2010 13:12:08 GMT) Full text and rfc822 format available.

Message sent on to James Y Knight <foom@fuhm.net>:
Bug#531529. (Mon, 20 Dec 2010 18:51:05 GMT) Full text and rfc822 format available.

Message #17 received at 531529-submitter@bugs.debian.org (full text, mbox):

From: Johann Felix Soden <johfel@gmx.de>
To: 531529-submitter@bugs.debian.org
Subject: Re: Bug#531529: Ping re: pdftk refuses to work with DRM'd PDFs
Date: Mon, 20 Dec 2010 19:47:00 +0100
Hi James!

On  Mon, 20.12.2010, 00:05 -0500 James Y Knight wrote:
> Just wondering if this bug got lost...Can this patch be applied?

Sorry my late answer to your bug report. 

You wrote the patch for pdftk 1.41-3, which I cannot support since it
contains non DFSG-free code.

For the current squeeze/sid pdftk version 1.41+dfsg-*, your patch does
not really work yet, since the there used itext library (version 2.1.7)
is intended to fail without the correct owner password - so it would be
needed to be patched first. It it very unlikely that such change is
accepted before the squeeze release.

But for pdftk 1.44 (currently in experimental, after the squeeze release
in sid), which uses again its own now cleaned itext-paulo library, your
patch works as far as I have tested it. Before including it, I want to
contact upstream first. Maybe a warning message that there is set an
owner password should be displayed if the owner password is not given to
pdftk. The wrong-password-message needs to be adapted, too.

Johann Felix





Information stored :
Bug#531529; Package pdftk. (Tue, 21 Dec 2010 06:57:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to James Y Knight <foom@fuhm.net>:
Extra info received and filed, but not forwarded. (Tue, 21 Dec 2010 06:57:06 GMT) Full text and rfc822 format available.

Message #22 received at 531529-quiet@bugs.debian.org (full text, mbox):

From: James Y Knight <foom@fuhm.net>
To: Johann Felix Soden <johfel@gmx.de>, 531529-quiet@bugs.debian.org
Subject: Re: Bug#531529: Ping re: pdftk refuses to work with DRM'd PDFs
Date: Tue, 21 Dec 2010 01:13:59 -0500
On Dec 20, 2010, at 1:47 PM, Johann Felix Soden wrote:
> Sorry my late answer to your bug report. 

No problem!

> You wrote the patch for pdftk 1.41-3, which I cannot support since it
> contains non DFSG-free code.

It *was* the most recent version at the time. :)

> For the current squeeze/sid pdftk version 1.41+dfsg-*, your patch does
> not really work yet, since the there used itext library (version 2.1.7)
> is intended to fail without the correct owner password

Yes I see, iText 2.0.3 (and up) apparently decided to incorporate that broken behavior internally, instead of depending upon its callers to have the extra line of code to enforce it. Harmfph.

> But for pdftk 1.44 (currently in experimental, after the squeeze release
> in sid), which uses again its own now cleaned itext-paulo library, your
> patch works as far as I have tested it.

I tested my patch with this version as well, and it seems to work fine.

> Before including it, I want to
> contact upstream first. Maybe a warning message that there is set an
> owner password should be displayed if the owner password is not given to
> pdftk. The wrong-password-message needs to be adapted, too.


I guess you can see what upstream thinks, but I find it unlikely that the completely extraneous line of code (the only purpose of which is to prevent users from manipulating PDFs with an owner password set) got in there by accident... So, I guess I wouldn't be surprised if they were not completely receptive to the patch. I'll note that other PDF software in Debian which has this deficiency upstream (mainly xpdf), has long been patched to remove it. E.g. bug #145558. 

A warning message would be fine.

Thanks,
James



Information stored :
Bug#531529; Package pdftk. (Thu, 15 Sep 2011 22:12:54 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tanguy Ortolo <tanguy+debian@ortolo.eu>:
Extra info received and filed, but not forwarded. (Thu, 15 Sep 2011 22:12:55 GMT) Full text and rfc822 format available.

Message #27 received at 531529-quiet@bugs.debian.org (full text, mbox):

From: Tanguy Ortolo <tanguy+debian@ortolo.eu>
To: Johann Felix Soden <johfel@gmx.de>, 531529-quiet@bugs.debian.org
Subject: Re: Bug#531529: Ping re: pdftk refuses to work with DRM'd PDFs
Date: Fri, 16 Sep 2011 00:08:21 +0200
[Message part 1 (text/plain, inline)]
Johann Felix Soden, 2010-12-20 19:47 UTC+0100:
> But for pdftk 1.44 (currently in experimental, after the squeeze release
> in sid), which uses again its own now cleaned itext-paulo library, your
> patch works as far as I have tested it.

Hello,

What is this bug status? I just find it annoying to obey arbitrary
restrictions on PDF documents when nothing technically forbids to read
them and thus to copy and modify them. I think those restrictions should
rather be considered as wished, or advices from the document's author,
like in: “I would prefer that you do not modify this document”.

For those that may come to this bug, here is one way to work around it:
    $ ps2pdf restricted.pdf cracked.pdf
    $ pdftk cracked.pdf {whatever}
(note that although ps2pdf is often used to convert PS to PDF, it
technically runs GhostScript to produce PDF from whatever GhostScript is
able to read, that is PS or PDF)

Regards,

-- 
 ,--.
: /` )   Tanguy Ortolo <xmpp:tanguy@ortolo.eu> <irc://irc.oftc.net/Elessar>
| `-'    Debian Maintainer
 \_
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending and patch. Request was from Johann Felix Soden <johfel@gmx.de> to control@bugs.debian.org. (Sun, 25 Sep 2011 17:42:08 GMT) Full text and rfc822 format available.

Reply sent to Johann Felix Soden <johfel@gmx.de>:
You have taken responsibility. (Sun, 25 Sep 2011 23:06:03 GMT) Full text and rfc822 format available.

Notification sent to James Y Knight <foom@fuhm.net>:
Bug acknowledged by developer. (Sun, 25 Sep 2011 23:06:04 GMT) Full text and rfc822 format available.

Message #34 received at 531529-close@bugs.debian.org (full text, mbox):

From: Johann Felix Soden <johfel@gmx.de>
To: 531529-close@bugs.debian.org
Subject: Bug#531529: fixed in pdftk 1.44-4
Date: Sun, 25 Sep 2011 23:02:40 +0000
Source: pdftk
Source-Version: 1.44-4

We believe that the bug you reported is fixed in the latest version of
pdftk, which is due to be installed in the Debian FTP archive:

pdftk_1.44-4.debian.tar.gz
  to main/p/pdftk/pdftk_1.44-4.debian.tar.gz
pdftk_1.44-4.dsc
  to main/p/pdftk/pdftk_1.44-4.dsc
pdftk_1.44-4_i386.deb
  to main/p/pdftk/pdftk_1.44-4_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 531529@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Johann Felix Soden <johfel@gmx.de> (supplier of updated pdftk package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 25 Sep 2011 19:46:52 +0200
Source: pdftk
Binary: pdftk
Architecture: source i386
Version: 1.44-4
Distribution: unstable
Urgency: low
Maintainer: Johann Felix Soden <johfel@gmx.de>
Changed-By: Johann Felix Soden <johfel@gmx.de>
Description: 
 pdftk      - tool for manipulating PDF documents
Closes: 531529
Changes: 
 pdftk (1.44-4) unstable; urgency=low
 .
   * Warn instead of fail processing a DRM protected pdf file if there is no
     owner password supplied. (Closes: #531529)
   * Support dpkg-buildflags, update patches/customise_build_parameters.
   * Switch to debhelper compat v8
   * debian/copyright: Update to latest DEP5 format and update years.
Checksums-Sha1: 
 90388cb6c31a88872c838153241f82c6afc249a2 1866 pdftk_1.44-4.dsc
 41f28c55d95b54a591c119902c498ff1c258ebda 10172 pdftk_1.44-4.debian.tar.gz
 24a50ae897b114a11c38ce75fdc35643709797dc 956148 pdftk_1.44-4_i386.deb
Checksums-Sha256: 
 24ca8bdb74d774ff316be7f948d02840bdbd25fbeaae00aefb2c27f183c8d69e 1866 pdftk_1.44-4.dsc
 748c5cfe7b4bc5c06d330adb2c1d704b273e03d366a3660093c176ceeb354e6b 10172 pdftk_1.44-4.debian.tar.gz
 7b902cab8884c071d6963f361480d47b33e7c3274b75a06266399cc8c6755d4b 956148 pdftk_1.44-4_i386.deb
Files: 
 b327f6835b5f0b84ceb1e4e2003e8f7f 1866 text optional pdftk_1.44-4.dsc
 5db3c5b575c2a613ad11903638f63341 10172 text optional pdftk_1.44-4.debian.tar.gz
 20e45e6e9e6c4a62d997558b524996fa 956148 text optional pdftk_1.44-4_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCgAGBQJOf7DFAAoJEINZGTv9ywnEvZcP/35lB69v1AgKWobl1BOQaxb0
/8q5nOdGBSp2DUytrIQ2iKQ+h7FdAjHUJe1GE3f+ay7M/3cUiC6yE4RoeHJc/28V
D3zXN43bK374QdD1JEheATIG1P3cVL5rpL2wVZG3pvB8VhVU9LhqKAgVYWDPU1x6
84wBith1lWTvaHRPVtES8XkNBRERW9fBdAXBsA1XvGkxYciKNOsaqW5oXFYl36g5
CgxciSv77JcXU5aMljHWERQo63//YmB0XAamNqzDiiWj6CWjSiZsLtO5lzu8nQ0n
lCSECnKCff4s7XHb4CQlBnBM+t0xIEvC1JxrySUU+Ipimr/3L27K0eToZvFa1Yia
KbZpDNMcfR4TtlmPkzaeaDAoEaehqQ5Coi+ne2yF36i71xdjL1pkjZyoxgFACpQj
fWe3y4hb8UmOfMRO3POjDCEqmb5GOhP2+vBz9SYCwO2YM/W1dFY0xe/GjkahkqcF
yvCK9Uth4zsGbKVjq5ot94skyJs9uzYrGemOP6QIMk0a8P02pYccQR5NN28YtpMP
z9aPihddE4C7q3tNPuTeYUdQVE9RZCmhQ3eiyHQNXUT32Rl8nHfOJJUK/Pm9b0LI
WZpsVJXoUIltZWtWR+dnMXGnJJpr+PECrWmgfNpL7sgBOIoHXFwfFqtVr34/uJjc
1JcnCWf8hy5vbnSa1b+6
=V25+
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 07 Nov 2011 07:35:02 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 17:36:46 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.