-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[api-minor] Add validation for the PDFDocumentProxy.getPageIndex
method
#14600
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
[api-minor] Add validation for the PDFDocumentProxy.getPageIndex
method
#14600
Conversation
…thod Currently we'll happily attempt to send any argument passed to this method over to the worker-thread, without doing any sort of validation. That could obviously be quite bad, since there's first of all no protection against sending unclonable data. Secondly, it's also possible to pass data that will cause the `Ref.get` call in the worker-thread to fail immediately. In order to address all of these issues, we'll now properly validate the argument passed to `PDFDocumentProxy.getPageIndex` and when necessary reject already on the main-thread instead.
/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/8c001b43a0a19f8/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/b92b80c4c26a618/output.txt |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/b92b80c4c26a618/output.txt Total script time: 22.44 mins
|
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/8c001b43a0a19f8/output.txt Total script time: 23.98 mins
Image differences available at: http://54.241.84.105:8877/8c001b43a0a19f8/reftest-analyzer.html#web=eq.log |
/botio-windows integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/6573537fdd85ed7/output.txt |
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/6573537fdd85ed7/output.txt Total script time: 8.52 mins
|
Good idea; thanks! |
Currently we'll happily attempt to send any argument passed to this method over to the worker-thread, without doing any sort of validation.
That could obviously be quite bad, since there's first of all no protection against sending unclonable data. Secondly, it's also possible to pass data that will cause the
Ref.get
call in the worker-thread to fail immediately.In order to address all of these issues, we'll now properly validate the argument passed to
PDFDocumentProxy.getPageIndex
and when necessary reject already on the main-thread instead.