From 6d8e883fe6ec6a39dd09a0148e05abc365521ff1 Mon Sep 17 00:00:00 2001 From: Colin VanLang Date: Thu, 15 Oct 2015 13:57:35 -0400 Subject: [PATCH] Fixes bluebeam password protection issue --- src/core/crypto.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/crypto.js b/src/core/crypto.js index 95d63b175..80c8fe78a 100644 --- a/src/core/crypto.js +++ b/src/core/crypto.js @@ -1762,9 +1762,10 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() { if (pdfAlgorithm.checkUserPassword(password, userValidationSalt, userPassword)) { return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption); - } else if (pdfAlgorithm.checkOwnerPassword(password, ownerValidationSalt, - uBytes, - ownerPassword)) { + } else if (password.length && pdfAlgorithm.checkOwnerPassword(password, + ownerValidationSalt, + uBytes, + ownerPassword)) { return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption); }