3

I have a website which uses some functionality implemented in the Firefox extension, which I developed. JavaScript script on one of my webpages requires UniversalXPConnect privilege for communicating with XPCOM component implemented in my Firefox extension.

By default, when my script tries to enable this privilege for accessing XPCOM component:

netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

... the following error occurs:

Error: A script from "http://example.com" was denied UniversalXPConnect privileges.

To enable this privilege currently users need to manually edit "signed.applets.codebase_principal_support" setting in "about:config" Firefox page.

From this page: http://www.mozilla.org/projects/security/components/signed-scripts.html I learned that it is possible to explicitly sign my webpage containing script which requires this privilege. After I sign my script users will not need to manually edit above mentioned setting.

Website is hosted on Linux platform under Drupal CMS.

I would very much appreciate if you could give me detailed step-by-step instructions on how do I sign my script (what tools should I download, how to create certificate, etc.), such that after following your instructions editing about:config setting will not be necessary.

John Conde
  • 217,595
  • 99
  • 455
  • 496
user441417
  • 31
  • 1
  • 4

2 Answers2

1

As of Firefox 16 signing the script will not likely work since support for universalXPconnect seems to have been removed and you should now use an add-on for added privileges although I don't know how. https://bugzilla.mozilla.org/show_bug.cgi?id=546848

0

EnablePrivilege is disabled in Firefox 15 and will be removed in Firefox 17.

check out this:

https://developer.mozilla.org/en-US/docs/Bypassing_Security_Restrictions_and_Signing_Code

vishal
  • 685
  • 2
  • 6
  • 9