1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Support parsing encrypted documents in XRef.indexObjects (issue 15893)

*Please note:* The reduced test-case is *not* a perfect reproduction of the original PDF document, since this one fails to open in e.g. Adobe Reader, but I do believe that it captures the most important points here.

For corrupt *and* encrypted PDF documents, it's possible that only some trailer dictionaries actually contain an /Encrypt-entry. Previously we'd could easily miss that, since we generally pick the first not obviously corrupt trailer dictionary, and the solution implemented here is to simply pre-parse all trailer dictionaries to see if there's any /Encrypt-entries.
This commit is contained in:
Jonas Jenwald 2023-01-06 10:27:20 +01:00
parent e36564668b
commit 7d94fdeb48
4 changed files with 35 additions and 11 deletions

View file

@ -413,6 +413,7 @@
!issue2128r.pdf
!bug1703683_page2_reduced.pdf
!issue5540.pdf
!issue15893_reduced.pdf
!issue5549.pdf
!visibility_expressions.pdf
!issue5475.pdf

Binary file not shown.

View file

@ -386,6 +386,13 @@
"lastPage": 4,
"type": "eq"
},
{ "id": "issue15893_reduced",
"file": "pdfs/issue15893_reduced.pdf",
"md5": "cf889b927f9f53d164622a99378bf39d",
"rounds": 1,
"type": "eq",
"password": "test"
},
{ "id": "bug1727053",
"file": "pdfs/bug1727053.pdf",
"md5": "8ed1e52da64000f9fdcb8b732f5a58f8",