-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Fixes bluebeam password protection issue #6531
Conversation
Do you have an example PDF file? It would be nice if it can be included as a test case too. |
https://www.dropbox.com/sh/e2v70szpauyjqvr/AACAYFqtfSPKdzrzI3FdBp9La?dl=0&s=so Both passwords are
|
Thank you for providing the test PDF. Could you add it to this PR in a similar way as in 27c8291? Essentially you put the Finally I'm not sure how we should format this line of code. Having all these parameters below each other on new lines and not aligned does not look great to me. Perhaps @Snuffleupagus, @yurydelendik or @brendandahl has a suggestion for formatting this in a more readable way? |
I'm not sure the test harness will work for this case, we want to show that the pdf won't render with a blank password. With a blank password I think it will error out. A unit test would probably work, but I'm fine with doing that in a follow up.
Nothing look good here with our short line limit, but lining the args up with the dot looks like we're chaining. Let's indent by two spaces e.g. https://github.com/mozilla/pdf.js/blob/master/src/display/api.js#L1664 |
That seems reasonable to me. Let's just indent the arguments with two more spaces (instead of aligning them with the dot) for readability. That will probably cause a new commit, so please squash the commits into one after you're done using the steps in https://github.com/mozilla/pdf.js/wiki/Squashing-Commits. |
I updated the branch to match your preferred styling. Let me know if you need any further changes made. |
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/0fcac4eacbb2d34/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/0fcac4eacbb2d34/output.txt Total script time: 0.65 mins Published |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/ffbef61bd43fff6/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://107.22.172.223:8877/6c5e861f679eacb/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/6c5e861f679eacb/output.txt Total script time: 18.69 mins
|
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/ffbef61bd43fff6/output.txt Total script time: 60.00 mins |
/botio-linux test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/0b38105a6d87917/output.txt |
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/0b38105a6d87917/output.txt Total script time: 0.65 mins
Image differences available at: http://107.21.233.14:8877/0b38105a6d87917/reftest-analyzer.html#web=eq.log |
Firefox is having issues updating on linux again, hopefully it resolved for the time being. |
From: Bot.io (Linux)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/144f1f69b1ffc13/output.txt |
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/144f1f69b1ffc13/output.txt Total script time: 6.71 mins
Image differences available at: http://107.21.233.14:8877/144f1f69b1ffc13/reftest-analyzer.html#web=eq.log |
This PR is probably good to merge, but the linux bot is still having issues. Now chrome seems to be leaving several processes behind. Looking into it more in #6508, so I don't generate more noise here. |
/botio-linux test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/28ed2425d5561aa/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/28ed2425d5561aa/output.txt Total script time: 19.98 mins
|
Fixes bluebeam password protection issue
Thanks for the fix. |
Fixes issue where a pdf will have a user password but no owner password. Previously, pdf.js will still show the pdf even though no password was given. Now, it checks that a password was given and that it matches either the user or owner password.