-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the implementation of the PDFDocument.fingerprints
-getter
#17862
Improve the implementation of the PDFDocument.fingerprints
-getter
#17862
Conversation
6e71445
to
4fd2419
Compare
4fd2419
to
87bc34c
Compare
87bc34c
to
112fa73
Compare
844cf02
to
2598a0b
Compare
c3e02cd
to
825d3f2
Compare
- Add explicit `length` validation of the /ID entries. Given the `EMPTY_FINGERPRINT` constant we're already *implicitly* assuming a particular length. - Move the constants into the `fingerprints`-getter, since they're not used anywhere else. - Replace the `hexString` helper function with the standard `Uint8Array.prototype.toHex` method; see https://github.com/tc39/proposal-arraybuffer-base64
…se64` usage in the main code-base See https://github.com/tc39/proposal-arraybuffer-base64
This allows using the new methods in browsers that support them, e.g. Firefox 133+, while still providing fallbacks where necessary; see https://github.com/tc39/proposal-arraybuffer-base64 *Please note:* These are not actual polyfills, but only implements what we need in the PDF.js code-base. Eventually this patch should be reverted, once support is generally available.
825d3f2
to
8f47d06
Compare
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/ebb2c4843e3db36/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/6273c2632b50cf7/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/ebb2c4843e3db36/output.txt Total script time: 30.65 mins
Image differences available at: http://54.241.84.105:8877/ebb2c4843e3db36/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/6273c2632b50cf7/output.txt Total script time: 46.16 mins
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you.
Add explicit
length
validation of the /ID entries. Given theEMPTY_FINGERPRINT
constant we're already implicitly assuming a particular length.Move the constants into the
fingerprints
-getter, since they're not used anywhere else.Replace the
hexString
helper function with the standardUint8Array.prototype.toHex
method; see https://github.com/tc39/proposal-arraybuffer-base64