poppler/PDFDoc.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 548648bf29dc1551443eb1925814342e7aadee46 Author: Albert Astals Cid <[email protected]> Date: Sun Feb 5 23:08:44 2012 +0100 [xpdf303] Merge PDFDoc encryption related code diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index 608b3ab..30e133a 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -419,7 +419,10 @@ GBool PDFDoc::checkEncryption(GooString *ownerPassword, GooString *userPassword) xref->getTrailerDict()->dictLookup("Encrypt", &encrypt); if ((encrypted = encrypt.isDict())) { if ((secHdlr = SecurityHandler::make(this, &encrypt))) { - if (secHdlr->checkEncryption(ownerPassword, userPassword)) { + if (secHdlr->isUnencrypted()) { + // no encryption + ret = gTrue; + } else if (secHdlr->checkEncryption(ownerPassword, userPassword)) { // authorization succeeded xref->setEncryption(secHdlr->getPermissionFlags(), secHdlr->getOwnerPasswordOk(), _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
