-
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
Support corrupt documents with *empty* Name
-entries (issue 13610)
#13612
Conversation
Apparently some really bad PDF software can create documents with *empty* `Name`-entries, which we thus need to somehow deal with. While I don't know if this patch is necessarily the best solution, it should at least ensure that the *empty* `Name`-instance cannot accidentally match a proper `Name`-instance (and it doesn't require changes to a lot of existing code).[1] --- [1] I briefly considered using a `Symbol` rather than an Object, but quickly decided against that since the former one [is not clonable](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#supported_types) and `Name`-instances may be sent to the API.
For once I've not run the entire test-suite locally, since it's already hot enough around here, so hopefully there won't be any regressions with this patch :-) /botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/9befdf2d344249d/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://3.101.106.178:8877/d40aa7576b705af/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/9befdf2d344249d/output.txt Total script time: 28.54 mins
Image differences available at: http://54.67.70.0:8877/9befdf2d344249d/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/d40aa7576b705af/output.txt Total script time: 32.68 mins
Image differences available at: http://3.101.106.178:8877/d40aa7576b705af/reftest-analyzer.html#web=eq.log |
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 1 Live output at: http://54.67.70.0:8877/0b1262c77e8a97c/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/0b1262c77e8a97c/output.txt Total script time: 4.78 mins Published |
Let's do this; thanks! /botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/7ded528c683c037/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 1 Live output at: http://3.101.106.178:8877/315113178b9f1d2/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/7ded528c683c037/output.txt Total script time: 25.28 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/315113178b9f1d2/output.txt Total script time: 29.82 mins
|
Apparently some really bad PDF software can create documents with empty
Name
-entries, which we thus need to somehow deal with.While I don't know if this patch is necessarily the best solution, it should at least ensure that the empty
Name
-instance cannot accidentally match a properName
-instance (and it doesn't require changes to a lot of existing code).[1][1] I briefly considered using a
Symbol
rather than an Object, but quickly decided against that since the former one is not clonable andName
-instances may be sent to the API.