pdf.js in Firefox 88+

General discussion about the NoScript extension for Firefox
Post Reply
barbaz
Senior Member
Posts: 9903
Joined: Sat Aug 03, 2013 5:45 pm

pdf.js in Firefox 88+

Post by barbaz » Sun Apr 11, 2021 9:12 pm

From FF 88 release notes -
https://www.mozilla.org/en-US/firefox/88.0beta/releasenotes/ wrote:We keep on working on improving our PDF forms support and now support JavaScript embedded in PDF files (some PDF forms use JavaScript for validation and other interactive features).
Does NoScript control this JS or will it be able to?
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
therube
Ambassador
Posts: 7696
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: pdf.js in Firefox 88+

Post by therube » Mon Apr 12, 2021 2:46 pm

Test & see, https://www.pdfscripting.com/public/Fre ... lendar.pdf.

(You would hope, that FF would provide a pref to control that behavior?
After all, JavaScript is safe :twisted:.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.7

User avatar
Giorgio Maone
Site Admin
Posts: 9089
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: pdf.js in Firefox 88+

Post by Giorgio Maone » Mon Apr 12, 2021 4:52 pm

Bad news: NoScript has no control of what happens inside PDF.js-handled pages.
Good news: you can disable JavaScript by turning the pdfjs.enablescripting about:config preference to false. Firefox will be also so kind to tell you if this breaks some feature of the current document and offer an external viewer.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0

barbaz
Senior Member
Posts: 9903
Joined: Sat Aug 03, 2013 5:45 pm

Re: pdf.js in Firefox 88+

Post by barbaz » Mon Apr 12, 2021 5:24 pm

Thanks for the replies.

@therube I see the pdfjs.enableScripting pref in FF 87, so I tried toggling that to true and testing that PDF, but couldn't get the script to work?

@Giorgio Can NoScript tell whether a page it can't control is pdf.js? If so, should the NoScript popup on FF 88+ recommend setting that pref when opened on a pdf.js page?
*Always* check the changelogs BEFORE updating that important software!
-

User avatar
Giorgio Maone
Site Admin
Posts: 9089
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: pdf.js in Firefox 88+

Post by Giorgio Maone » Mon Apr 12, 2021 6:07 pm

barbaz wrote:
Mon Apr 12, 2021 5:24 pm
@therube I see the pdfjs.enableScripting pref in FF 87, so I tried toggling that to true and testing that PDF, but couldn't get the script to work?
That one didn't work for me either, but this one pops up a JS alert as soon as you hit the submit button.
barbaz wrote:
Mon Apr 12, 2021 5:24 pm
@Giorgio Can NoScript tell whether a page it can't control is pdf.js? If so, should the NoScript popup on FF 88+ recommend setting that pref when opened on a pdf.js page?
Need to check, but if it's possible I think it's a good idea.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0

Post Reply