Is there a way to allow a particular URI using a regular expression?
I want to allow a single static page on my computer, but I do not want to allow the whole file:/// "protocol"
Allow URI by regex?
- Lucas Malor
- Senior Member
- Posts: 71
- Joined: Tue Nov 09, 2010 2:01 pm
- Contact:
Allow URI by regex?
Last edited by GµårÐïåñ on Sun Dec 06, 2015 10:54 pm, edited 1 time in total.
Reason: spelling
Reason: spelling
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0
Re: Allow URI by regex?
In short: not easily.
You could try serving the page via Apache? It's pretty easy to set up.
You could try serving the page via Apache? It's pretty easy to set up.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Re: Allow URI by regex?
Well, you can Temporarily allow file:// and load *only* the one file in the browser session.
But the way that NoScript works, being geared toward security - either you trust a site or you don't... and if you don't trust your own filesystem, then you have a MUCH bigger problem than NoScript can handle!!!!!!!!!!!!!!!!!!!!!

But the way that NoScript works, being geared toward security - either you trust a site or you don't... and if you don't trust your own filesystem, then you have a MUCH bigger problem than NoScript can handle!!!!!!!!!!!!!!!!!!!!!
*Always* check the changelogs BEFORE updating that important software!
-
Re: Allow URI by regex?
Well, let's not go too far; it's quite reasonable to have downloaded various files from sites with varying degrees of trustworthiness, and want to run script in some but not others.barbaz wrote:if you don't trust your own filesystem
What kind of a static page are we talking about?
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
-
Luke42
Re: Allow URI by regex?
Sorry to dig out this old thread...
Is this still current/true? I have the same problem, i want to allow Javascript on some specific local files only (custom startpage in Firefox for example) but i don't want to allow file:// globally.
If this is still not possible, any other solutions? I thought about maybe using Greasemonkey in some way, because GM-Code will run even with JS disabled, but i'm not sure it would work (and how) and it feels like an ugly hack. Something with a local webserver could work but it feels quite overkill and i don't know anything about Apache and stuff.
Any ideas?
Is this still current/true? I have the same problem, i want to allow Javascript on some specific local files only (custom startpage in Firefox for example) but i don't want to allow file:// globally.
If this is still not possible, any other solutions? I thought about maybe using Greasemonkey in some way, because GM-Code will run even with JS disabled, but i'm not sure it would work (and how) and it feels like an ugly hack. Something with a local webserver could work but it feels quite overkill and i don't know anything about Apache and stuff.
Any ideas?
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0
Re: Allow URI by regex?
Yes.Luke42 wrote:Is this still current/true?
Why not?Luke42 wrote:i don't want to allow file:// globally.
1) Fix your filesystem so that you can trust it.Luke42 wrote:If this is still not possible, any other solutions?
2) Set up Apache or nginx and run a local server.
3) Create a simple Firefox extension that contains only the one page (and whatever external files it needs). Then your page should be accessible from a URI that is allowed by default.
*Always* check the changelogs BEFORE updating that important software!
-
-
Luke42
Re: Allow URI by regex?
Thank you for your quick answer!
As Thrawn mentionned some people (including myself) sometimes download suspect html-files (like from links in spam/phishing-mails) to analyze, i don't want their JS running if i'm not carefull and open them while file:// is allowed (and if i want to use my trusted local files file:// would be allowed all the time so i would have to disable it before opening a non-trusted file, way to risky).barbaz wrote:Why not?Luke42 wrote:i don't want to allow file:// globally.
see above1) Fix your filesystem so that you can trust it.Luke42 wrote:If this is still not possible, any other solutions?
Yeah, maybe i will need to have a look at all this stuff.2) Set up Apache or nginx and run a local server.
That could be a solution indeed. I don't know anything about FF-extensions but i suppose it's not too difficult and probably better than a webserver. I will dig into this as soon as i have some time. Thank you for the suggestion.3) Create a simple Firefox extension that contains only the one page (and whatever external files it needs). Then your page should be accessible from a URI that is allowed by default.
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0