summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-crypt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/pdf/pdf-crypt.c b/source/pdf/pdf-crypt.c
index c427e85e..f73617ff 100644
--- a/source/pdf/pdf-crypt.c
+++ b/source/pdf/pdf-crypt.c
@@ -788,6 +788,12 @@ pdf_authenticate_password(fz_context *ctx, pdf_document *doc, const char *pwd_ut
* stored keys. */
(void)pdf_authenticate_user_password(ctx, doc->crypt, (unsigned char *)password, strlen(password));
}
+
+ /* To match Acrobat, we choose not to allow an empty owner
+ * password, unless the user password is also the empty one. */
+ if (*password == 0 && auth == 4)
+ return 0;
+
return auth;
}