[poppler] Branch 'poppler-0.20' - poppler/SecurityHandler.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Aug 5 06:13:05 PDT 2012


 poppler/SecurityHandler.cc |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 40e7b744d32152ab4c6201b8bda7fb7caf6bfd4e
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Aug 5 15:07:16 2012 +0200

    If NULL, NULL fails as password try EMPTY, EMPTY before failing
    
    Reviewed by Jose Aliste
    Bug #3498

diff --git a/poppler/SecurityHandler.cc b/poppler/SecurityHandler.cc
index 00c4ae1..a48449a 100644
--- a/poppler/SecurityHandler.cc
+++ b/poppler/SecurityHandler.cc
@@ -105,7 +105,12 @@ GBool SecurityHandler::checkEncryption(GooString *ownerPassword,
     }
   }
   if (!ok) {
-    error(errCommandLine, -1, "Incorrect password");
+    if (!ownerPassword && !userPassword) {
+      GooString dummy;
+      return checkEncryption(&dummy, &dummy);
+    } else {
+      error(errCommandLine, -1, "Incorrect password");
+    }
   }
   return ok;
 }


More information about the poppler mailing list