Noscript PDF file can't be loaded?!

Ask for help about NoScript, no registration needed to post
ReporterX
Senior Member
Posts: 74
Joined: Mon Sep 15, 2014 11:46 pm

Noscript PDF file can't be loaded?!

Post by ReporterX »

I'm trying to open this PDF in the browser but it fails to load.
I'm using PDF Viewer addon.
I can open other PDFs in other websites. They are all loading fine.
Is it just me? :cry: Or something wrong with this PDF?

Also Noscript asks me whether to allow pdf.js.
Should I allow it?
Thanks a lot. :)
Firefox 37.0.2, NoScript 2.6.9.22
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 11144
Joined: Sat Aug 03, 2013 5:45 pm

Re: Noscript PDF file can't be loaded?!

Post by barbaz »

pdfjs issue
Try this link?
(Personally I modify the pdfjs addon to work around this issue. So i don't remember if that's the right link or not.
I'll PM you the diff if you like, so that you can make yourself a modified version where you can simply go to the PDF and it will load.)
ReporterX wrote:Also Noscript asks me whether to allow pdf.js.
Should I allow it?
That is actually "resource://pdf.js" so even though it doesn't show up as Allowed in the menu, it is. No need to Allow it.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29
ReporterX
Senior Member
Posts: 74
Joined: Mon Sep 15, 2014 11:46 pm

Re: Noscript PDF file can't be loaded?!

Post by ReporterX »

barbaz wrote:pdfjs issue
Try this link?
Yes it works.
But if I open it in a new tab, it does not load (you get a blank page). You need to refresh to load it.
If I open in the current tab, it loads fine. :)
barbaz wrote:(Personally I modify the pdfjs addon to work around this issue. So i don't remember if that's the right link or not.
I'll PM you the diff if you like, so that you can make yourself a modified version where you can simply go to the PDF and it will load.)
Is it a modified xpi? If so, yes PM me.
I don't know how to patch a diff to the xpi.
barbaz wrote:That is actually "resource://pdf.js" so even though it doesn't show up as Allowed in the menu, it is. No need to Allow it.
Yes the PDF still loads without the permission.
But one issue now - it keeps asking me every time I open a PDF. It seems strange to set it as untrusted. :|
I think there is no harm to set it as allowed too (like in terms of potential security risks :twisted: ). Am I right?
Firefox 37.0.2, NoScript 2.6.9.22
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 11144
Joined: Sat Aug 03, 2013 5:45 pm

Re: Noscript PDF file can't be loaded?!

Post by barbaz »

ReporterX wrote:Is it a modified xpi? If so, yes PM me.
I don't know how to patch a diff to the xpi.
An XPI is just a zip file which has an install.rdf file on the top level of the archive, so in order to apply the diff, you would
1) extract the XPI (rename to .zip if needed) into its own directory
2) apply the diff to the files (I just do this step manually :? )
3) in the directory with install.rdf, select all, compress the selection as .zip, then change the .zip filename extension to .xpi

To install, drag&drop your XPI onto the browser window.

If you don't have an archive manager on your system, I've had good experience with 7-Zip, though it can be a little slow sometimes.
If any of that sounds too complicated for you, I can try to PM you a modified XPI, but that's a bit of a pain for me.
ReporterX wrote:
barbaz wrote:That is actually "resource://pdf.js" so even though it doesn't show up as Allowed in the menu, it is. No need to Allow it.
Yes the PDF still loads without the permission.
But one issue now - it keeps asking me every time I open a PDF. It seems strange to set it as untrusted. :|
I think there is no harm to set it as allowed too (like in terms of potential security risks :twisted: ). Am I right?
Don't set it as Untrusted as that will place additional restrictions on it that may take precedence over the whitelisted status and thus mess up the addon.
It won't hurt to Allow it unless you somehow access a site like "http://www.pdf.js/" and it's malicious...
(I haven't seen such a site yet, but I've never tried to type that in / go there)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29
User avatar
therube
Ambassador
Posts: 7980
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Noscript PDF file can't be loaded?!

Post by therube »

URL: http://noscript.net/abe/abe_rules.pdf

> I'm using PDF Viewer addon.

Why?
It's now part of FF (32)?

> pdfjs issue

That's talking about Nightly, OP is on 32?
So 32 is affected, similarly.
Or is it actually a server issue?
And while the pdf link from github does work, Giorgio's server, what needs a patch to correct its issue?

> Try this link?

Yes, that works - after a page reload. Unexpected.
And #disableRange=true is mention in the github link.
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; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29
User avatar
therube
Ambassador
Posts: 7980
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Noscript PDF file can't be loaded?!

Post by therube »

Ah, is the real issue this, viewtopic.php?f=7&t=20064.
(And might that also account for some other recent "bugs"?)

IOW, disallow noscript.net & the abe_ruies.pdf loads, no trickery required.
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; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29
ReporterX
Senior Member
Posts: 74
Joined: Mon Sep 15, 2014 11:46 pm

Re: Noscript PDF file can't be loaded?!

Post by ReporterX »

therube wrote:> I'm using PDF Viewer addon.

Why?
It's now part of FF (32)?
Yes I think so.
I have installed it for quite some time.
Maybe I should as well remove it.

therube wrote:> pdfjs issue

That's talking about Nightly, OP is on 32?
So 32 is affected, similarly.
Or is it actually a server issue?
And while the pdf link from github does work, Giorgio's server, what needs a patch to correct its issue?
I'm using Firefox 32.0.1 (stable version)

therube wrote: > Try this link?

Yes, that works - after a page reload. Unexpected.
And #disableRange=true is mention in the github link.
Yes it only works if I use #disableRange=true to load.
Firefox 37.0.2, NoScript 2.6.9.22
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
ReporterX
Senior Member
Posts: 74
Joined: Mon Sep 15, 2014 11:46 pm

Re: Noscript PDF file can't be loaded?!

Post by ReporterX »

therube wrote:Ah, is the real issue this, viewtopic.php?f=7&t=20064.
(And might that also account for some other recent "bugs"?)

IOW, disallow noscript.net & the abe_ruies.pdf loads, no trickery required.
No, it is not the cause.
I tried to test it in a fresh profile. The PDF still fails to load.
It seems to be either the server issue or the pdf.js bug.

Try hard refresh if you could load since it might just load from your cache.

P.S. I removed the PDF Viewer addon but it couldn't load PDF anymore.
I had to reinstall it. But my fresh profile could load PDF by default. Hmm... :?
Firefox 37.0.2, NoScript 2.6.9.22
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 11144
Joined: Sat Aug 03, 2013 5:45 pm

Re: Noscript PDF file can't be loaded?!

Post by barbaz »

therube wrote:> I'm using PDF Viewer addon.

Why?
It's now part of FF (32)?
I believe the version included in Fx release isn't the latest available version.
therube wrote:> pdfjs issue

That's talking about Nightly
...and it's a really old issue report from back when Gecko 26 was Nightly...
therube wrote:Or is it actually a server issue?
Yes, it is, but unlike the pdf.js team, I can't depend on other people's servers to work properly, especially considering that even Giorgio's server has this issue.
therube wrote:And while the pdf link from github does work, Giorgio's server, what needs a patch to correct its issue?
My mod to pdfjs isn't at all "necessary." It's just much more convenient, and makes me less likely to run into issues that aren't on my end.

@therube (and anyone else on this forum staff too): you also are welcome to have my mod to pdfjs, if you use pdfjs, and if you want. Note though that my mod is not useful to the pdfjs devs because IIRC (it's been a while) basically all I've done is flip an internal switch, and it seems from the issue report that I linked, that the pdf.js devs have no interest in doing the same.
therube wrote:Ah, is the real issue this, viewtopic.php?f=7&t=20064.
That topic was about a link which had a click listener that apparently caused NoScript to block left-clicking on it. The link I posted doesn't have any click listener...
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29
barbaz
Senior Member
Posts: 11144
Joined: Sat Aug 03, 2013 5:45 pm

Re: Noscript PDF file can't be loaded?!

Post by barbaz »

@ReporterX: Sorry, I'm not clear on whether you think you can apply a diff using these instructions, or if I should upload a modified XPI somewhere for you to download? I'm willing to do either; just that if I upload the full XPI, you won't have it quite as quickly.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29
ReporterX
Senior Member
Posts: 74
Joined: Mon Sep 15, 2014 11:46 pm

Re: Noscript PDF file can't be loaded?!

Post by ReporterX »

barbaz wrote:@ReporterX: Sorry, I'm not clear on whether you think you can apply a diff using these instructions, or if I should upload a modified XPI somewhere for you to download? I'm willing to do either; just that if I upload the full XPI, you won't have it quite as quickly.
An XPI would be better. I can wait. :)
Thank you in advance.
Firefox 37.0.2, NoScript 2.6.9.22
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
barbaz
Senior Member
Posts: 11144
Joined: Sat Aug 03, 2013 5:45 pm

Re: Noscript PDF file can't be loaded?!

Post by barbaz »

@ReporterX: FYI, if you haven't seen already, this issue has been officially fixed now https://github.com/mozilla/pdf.js/commi ... 8c87267fed
(Been testing those patches unofficially for some time, and it WFM)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:32.0) Gecko/20100101 SeaMonkey/2.29.1
Post Reply