-
- Downloads
getPDFSignatureCount: fix "too much recursion" error with some PDFs
The regex used to detect signatures uses "(.|\\s)" to emulate dotall, since old browsers don't support it. For some reason that leads to internal errors in Firefox with larger files in some cases. Replacing it with a simpler "[\\s\\S]" class makes things work. Also adds some tests with real PDF files, "QPDF-367-0.pdf" was triggering this issue. Fixes #46
parent
5c15f2c0
No related branches found
No related tags found
Showing
- karma.conf.js 2 additions, 1 deletionkarma.conf.js
- rollup.config.js 8 additions, 0 deletionsrollup.config.js
- src/utils.js 1 addition, 1 deletionsrc/utils.js
- test/data/QPDF-367-0.pdf 0 additions, 0 deletionstest/data/QPDF-367-0.pdf
- test/data/README.md 2 additions, 0 deletionstest/data/README.md
- test/data/qual-sig-simple.pdf 0 additions, 0 deletionstest/data/qual-sig-simple.pdf
- test/data/qual-sig-tugraz-multiple.pdf 0 additions, 0 deletionstest/data/qual-sig-tugraz-multiple.pdf
- test/unit.js 14 additions, 0 deletionstest/unit.js
test/data/QPDF-367-0.pdf
0 → 100644
File added
test/data/README.md
0 → 100644
test/data/qual-sig-simple.pdf
0 → 100644
File added
test/data/qual-sig-tugraz-multiple.pdf
0 → 100644
File added
Please register or sign in to comment