Merge pull request #19555 from rossj/master
Pad rev 4 encryption keys to be >= 16 bytes (issue 19484)
This commit is contained in:
commit
aa70b28365
@ -1787,7 +1787,14 @@ class CipherTransformFactory {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (algorithm === 4 && encryptionKey.length < 16) {
|
||||||
|
// Extend key to 16 byte minimum (undocumented),
|
||||||
|
// fixes issue19484_1.pdf and issue19484_2.pdf.
|
||||||
|
this.encryptionKey = new Uint8Array(16);
|
||||||
|
this.encryptionKey.set(encryptionKey);
|
||||||
|
} else {
|
||||||
this.encryptionKey = encryptionKey;
|
this.encryptionKey = encryptionKey;
|
||||||
|
}
|
||||||
|
|
||||||
if (algorithm >= 4) {
|
if (algorithm >= 4) {
|
||||||
const cf = dict.get("CF");
|
const cf = dict.get("CF");
|
||||||
|
|||||||
2
test/pdfs/.gitignore
vendored
2
test/pdfs/.gitignore
vendored
@ -106,6 +106,7 @@
|
|||||||
!issue9084.pdf
|
!issue9084.pdf
|
||||||
!issue12963.pdf
|
!issue12963.pdf
|
||||||
!issue9105_reduced.pdf
|
!issue9105_reduced.pdf
|
||||||
|
!issue19484_2.pdf
|
||||||
!issue9105_other.pdf
|
!issue9105_other.pdf
|
||||||
!issue9252.pdf
|
!issue9252.pdf
|
||||||
!issue9262_reduced.pdf
|
!issue9262_reduced.pdf
|
||||||
@ -481,6 +482,7 @@
|
|||||||
!openoffice.pdf
|
!openoffice.pdf
|
||||||
!js-buttons.pdf
|
!js-buttons.pdf
|
||||||
!issue7014.pdf
|
!issue7014.pdf
|
||||||
|
!issue19484_1.pdf
|
||||||
!issue8187.pdf
|
!issue8187.pdf
|
||||||
!annotation-link-text-popup.pdf
|
!annotation-link-text-popup.pdf
|
||||||
!issue9278.pdf
|
!issue9278.pdf
|
||||||
|
|||||||
BIN
test/pdfs/issue19484_1.pdf
Normal file
BIN
test/pdfs/issue19484_1.pdf
Normal file
Binary file not shown.
BIN
test/pdfs/issue19484_2.pdf
Normal file
BIN
test/pdfs/issue19484_2.pdf
Normal file
Binary file not shown.
@ -3629,6 +3629,14 @@
|
|||||||
"link": false,
|
"link": false,
|
||||||
"type": "text"
|
"type": "text"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "issue19484_1",
|
||||||
|
"file": "pdfs/issue19484_1.pdf",
|
||||||
|
"md5": "4e9e78a84226dbdddbd735388ccc2dcd",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "issue5644",
|
"id": "issue5644",
|
||||||
"file": "pdfs/issue5644.pdf",
|
"file": "pdfs/issue5644.pdf",
|
||||||
@ -5043,6 +5051,14 @@
|
|||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "issue19484_2",
|
||||||
|
"file": "pdfs/issue19484_2.pdf",
|
||||||
|
"md5": "cd3050eda9fa18a7e6a78c702f9890bb",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "bug894572",
|
"id": "bug894572",
|
||||||
"file": "pdfs/bug894572.pdf",
|
"file": "pdfs/bug894572.pdf",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user