Local links not working in FF28?

Ask for help about NoScript, no registration needed to post
devinname

Re: Local links not working in FF28?

Post by devinname »

Giorgio Maone wrote: The way I was going to implement it is pretty simple, i.e. intercepting the load attempt in our nsIContentPolicy.shouldLoad() implementation and, if both the page and the destination match the whitelist, block the current load and restart it it from chrome context (where the check is relaxed).
Anyway I'd love to look at your implementation, thank you.
Y'all are such awesome sauce.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Local links not working in FF28?

Post by Giorgio Maone »

barbaz wrote:
Giorgio Maone wrote:Anyway I'd love to look at your implementation, thank you.
sent by PM
After a bit of testing and scrubbing Mozilla's source code, I've realized your approach, albeit scary and necessarily incomplete, is more feasible than mine: content policies are always called after checkLoadURI checks, unfortunately. :(

So, if you don't mind, I'm gonna steal your idea, with many thanks.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Local links not working in FF28?

Post by barbaz »

Giorgio Maone wrote:your approach, albeit scary and necessarily incomplete
I know :shock: :o
Giorgio Maone wrote:So, if you don't mind, I'm gonna steal your idea, with many thanks.
Fine by me, go for it! You're welcome.
(I trust that you'll add the necessary safety and privacy checks, some of which I probably haven't even thought of...)
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26a2
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Local links not working in FF28?

Post by Giorgio Maone »

Please check latest development build 2.6.8.20rc3, thank you.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Koopz

Re: Local links not working in FF28?

Post by Koopz »

Well local links seem to work again. At least they open stuff again.
There is only one problem left:
Links to local folders are opened in Firefox' dirlisting now instead of Windows Explorer.
It seems like the locked options for the file-protocol don't seem to work at all.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Local links not working in FF28?

Post by Giorgio Maone »

Koopz wrote:Well local links seem to work again. At least they open stuff again.
There is only one problem left:
Links to local folders are opened in Firefox' dirlisting now instead of Windows Explorer.
It seems like the locked options for the file-protocol don't seem to work at all.
I'm afraid this is not a NoScript-related issue, but a change in Firefox.
If this behavior is critical to your business, drop me a PM or an email and I'll see if we can work out something.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Hansl
Junior Member
Posts: 28
Joined: Wed Apr 02, 2014 6:58 am

Re: Local links not working in FF28?

Post by Hansl »

For me, with NS 2.6.8.20 local links (to files) work again in my FF28.0.
Big thanks, I'm much relieved! Hans
Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0
selios

Re: Local links not working in FF28?

Post by selios »

Thank you so much for this.

I was going crazy trying to make my subsonic work again on my local computer.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Koopz

Re: Local links not working in FF28?

Post by Koopz »

Did you get my mail?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Local links not working in FF28?

Post by Giorgio Maone »

Koopz wrote:Did you get my mail?
I might have lost it in my spam can or something :(
Could you please tell me the exact subject for me to search it?
Thank you very much!
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
Koopz

Re: Local links not working in FF28?

Post by Koopz »

Giorgio Maone wrote:
Koopz wrote:Did you get my mail?
I might have lost it in my spam can or something :(
Could you please tell me the exact subject for me to search it?
Thank you very much!
"Open local folders with Windows Explorer"
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
memeguy

Re: Local links not working in FF28?

Post by memeguy »

Then, how are we supposed to enable local links in FF29 if the old CAPS no longer work? Is the only choice to revert to FF28 until this is fixed?
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Local links not working in FF28?

Post by Giorgio Maone »

memeguy wrote:Then, how are we supposed to enable local links in FF29 if the old CAPS no longer work? Is the only choice to revert to FF28 until this is fixed?
This will never be fixed in Firefox, but it's partially fixed (see above) if you use NoScript with its "Trusted|Allow local links" option and/or its new, finer grained noscript.allowLocalLinks.* about:config preferences.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
memeguy

Re: Local links not working in FF28?

Post by memeguy »

Thank you! It does work now if it's a link I directly click on. However, It still fails and I get a Security Error in the Error Console if the local link is in a Location: directive from a redirected link. Am I missing something?
Giorgio Maone wrote:
memeguy wrote:Then, how are we supposed to enable local links in FF29 if the old CAPS no longer work? Is the only choice to revert to FF28 until this is fixed?
This will never be fixed in Firefox, but it's partially fixed (see above) if you use NoScript with its "Trusted|Allow local links" option and/or its new, finer grained noscript.allowLocalLinks.* about:config preferences.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
barbaz
Senior Member
Posts: 10847
Joined: Sat Aug 03, 2013 5:45 pm

Re: Local links not working in FF28?

Post by barbaz »

memeguy wrote:Thank you! It does work now if it's a link I directly click on. However, It still fails and I get a Security Error in the Error Console if the local link is in a Location: directive from a redirected link. Am I missing something?
The code I gave Giorgio requires a click on a direct link in order to bypass the security checks. IMO allowing links that redirect to a local location to bypass security checks in the same way would be too dangerous.

ETA Oh, I guess if you can't change the server configuration, you could work around by setting up NoRedirect to block these redirects but not show a DNS error, then you would be presented with the redirect page and a direct local link which you can then click on.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26
Post Reply