-1

in firefox 3, we could open file:/// in a web page (http://myserver.com/mypage.html). With that, we design a firefox Extension for open external application with a specific protocol. (like calc:// for open a link in calc program )

Now, we would use it on firefox 5, but the Gecko 2.0 refuse that. When i try to open a link, i have this backtrace in cosole :

Security Error: Content at http ://myserver.com/mypage.html may not load or link to file:///C:/test.odf.

It's Normal. Firefox 4 & 5 don't support this :

Firefox 4 Support for remote XUL has long been a potential security concern; support for it was disabled in Gecko 2.0. This also means you can't load XUL using file:// URLs unless you set the preference dom.allow_XUL_XBL_for_file to true. However, there is a whitelist that lets you specify sites that can still use remote XUL. The Remote XUL Manager extension lets you manage this whitelist.

source : https://developer.mozilla.org/en/using_remote_xul

i try to use remote XUL manager : it doesn't work. Same problem with adding dom.allow_XUL_XBL_for_file in about:config

I read this bugtracker https://bugzilla.mozilla.org/show_bug.cgi?id=595397 and my bug should not be.

This doesn't work on Firefox 4,5 under windows XP or 7.

I don't now where i can't find some information,

Thanks for your help

Gaetantri
  • 1
  • 1
  • 1
  • I've answered, as best I can, but I can't make out, in your 'question,' the question you're actually **asking**...could you clarify that for me? – David Thomas Jul 06 '11 at 21:22
  • Remote XUL has absolutely nothing to do with the fact that web pages aren't allowed to link to file:// addresses, it's a different change. In other words, everything you quote and link to after the words "It's Normal" is unrelated and misleading. – Wladimir Palant Jul 07 '11 at 13:22
  • @David : i want to open file:// and custom protocol in firefox 5. We design an extension in firefox 3, but don't work in firefox 4 and 5. I was thinking Remote XUL change is the problem, but not apparently. – Gaetantri Jul 07 '11 at 19:20

1 Answers1

1

Linking to local files was disallowed from remote files in the name of security; this safety check can be overridden by the user (but not without explicit user action).

  1. First, the user can install Local Link (Firefox extension), or
  2. Secondly, by disabling the security check (this is a little too detailed to post here, so I'll link to the Mozilla knowledgebase for this: http://kb.mozillazine.org/Links_to_local_pages_do_not_work).

As regards the calc:// protocol, I'm not sure why that's not handled automatically, but to set up a custom URL handler (on Windows), you can use the command-line:

ftype calc # view current binding
ftype calc=\path\to\calcProgram.exe %1

References:

Community
  • 1
  • 1
David Thomas
  • 249,100
  • 51
  • 377
  • 410
  • thanks for your answer. I have the same problem with Local Link ( with or without my personnal extension), and i use the user_pref on my personal user.js, but nothing happend. I've try too : - Setting security.checkloaduri to false - Setting security.fileuri.strict_origin_policy to false – Gaetantri Jul 07 '11 at 05:12
  • @Gaetantri: LocalLink allows opening file:// **links** via context menu (stated on its homepage) - it won't help in your case. And if you read the Mozillazine Knowledgebase article - `security.checkloaduri` preference has been removed long ago (in Firefox 1.5 actually). `security.fileuri.strict_origin_policy` is again something entirely unrelated. You should try it with the `capability.policy.` prefs - I'm not sure whether they still work but they *could*. – Wladimir Palant Jul 07 '11 at 13:31
  • i've try to create capability.policy in my user.js, but nothing appends. this problem starts with firefox 4. – Gaetantri Jul 07 '11 at 19:17