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; }