2

I want to know that how can I read the about:config preferences of Mozilla Firefox ? Please note that I do not want to change its value, I only want to read them.

I've already gone through about-config-preferences-and-js

but I end up following error. RefrenceError: getPrefs is not defined.

Will anyone help to get me out from this?

Community
  • 1
  • 1
Ravi A
  • 505
  • 1
  • 5
  • 16
  • what are you trying to acomplish by reading the prefs ? – Anil Bharadia Jun 12 '13 at 07:20
  • While accessing to https protocol, firefox checks the value of one preference and throws an error. I want to check that value before firefox and want to stop request execution. – Ravi A Jun 12 '13 at 07:25
  • in new tab if you open the console and write script there, it will be accesible, but if you load any page then it will not be accesible. see : https://support.mozilla.org/en-US/questions/938251 – Anil Bharadia Jun 12 '13 at 10:31
  • i think in ur firefox you have installed some addon which is causing this issue, try different machine – Anil Bharadia Jun 12 '13 at 10:33
  • nop, its not a problem about machine. Its a possibility and we want to put precautions in our project so that users can be informed on such issue. – Ravi A Jun 12 '13 at 12:51

1 Answers1

1

I don't think it is possible as a security measure

If the browser configuration is exposed to client code like javascript then it could modify the setting to create/expose vulnerabilities

Arun P Johny
  • 384,651
  • 66
  • 527
  • 531
  • Please refer the link I've shared in question. Though its tweaky but it is possible. – Ravi A Jun 12 '13 at 07:27
  • that was in terms of firefox addons – Arun P Johny Jun 12 '13 at 07:29
  • Arun and @Anil Yes, it seems impossible to execute from a web page. We can execute it from an add-on SDK, in other way we can put a JS file which will be invoked on firefox startup. – Ravi A Jun 12 '13 at 12:58