Merge pull request #6531 from covlllp/new_merge

Fixes bluebeam password protection issue
This commit is contained in:
Brendan Dahl 2015-10-16 13:47:06 -07:00
commit e4f0e6f2a0

View File

@ -1762,9 +1762,10 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
if (pdfAlgorithm.checkUserPassword(password, userValidationSalt, if (pdfAlgorithm.checkUserPassword(password, userValidationSalt,
userPassword)) { userPassword)) {
return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption); return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption);
} else if (pdfAlgorithm.checkOwnerPassword(password, ownerValidationSalt, } else if (password.length && pdfAlgorithm.checkOwnerPassword(password,
uBytes, ownerValidationSalt,
ownerPassword)) { uBytes,
ownerPassword)) {
return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes, return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes,
ownerEncryption); ownerEncryption);
} }