Security preferences

  • Revision slug: Midas/Security_preferences
  • Revision title: Security preferences
  • Revision id: 69920
  • Created:
  • Creator: Jcelaya
  • Is current revision? No
  • Comment Reverted to earlier version; 470 words removed

Revision Content

To protect users' private information, unprivileged scripts cannot invoke the Cut, Copy, and Paste commands in the Mozilla rich text editor, so the corresponding buttons on the Mozilla Rich Text Editing demo page will not work. To enable these functions for purposes of the demo, you must modify your browser preferences.

For Firefox:

  1. Quit Firefox. If you have Quick Launch running (in Windows, an icon in the toolbar), quit that too.
  2. Find your Firefox profile directory.
  3. Open the user.js file from that directory in a text editor. If there's no user.js file, create one.
  4. Add these lines to user.js:

    user_pref("capability.policy.policynames", "allowclipboard");
    user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org");
    user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
    user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");

     * Change the url "http://www.mozilla.org" to the site for which you want to enable this function.

  5. Save the file, and restart Firefox. The Clipboard buttons should now function.
Note: The preference is site as well as protocol specific. For example:
user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org")

is not the same as:

user_pref("capability.policy.allowclipboard.sites", "https://www.mozilla.org")

This is because the first uses HTTP while the second uses HTTPS.

If you want to allow multiple urls to access the Paste operation, separate the urls with a space. For example:

user_pref("capability.policy.allowclipboard.sites",
 "http://www.mozilla.org https://www.mozilla.org")

For more information about security policies, see http://www.mozilla.org/projects/security/components/ConfigPolicy.html.

Revision Source

<p>To protect users' private information, unprivileged scripts cannot invoke the Cut, Copy, and Paste commands in the Mozilla rich text editor, so the corresponding buttons on the Mozilla Rich Text Editing demo page will not work. To enable these functions for purposes of the demo, you must modify your browser preferences.</p>
<p>For Firefox:</p>
<ol> <li>Quit Firefox. If you have Quick Launch running (in Windows, an icon in the toolbar), quit that too.</li> <li><a class=" external" href="http://support.mozilla.com/en-US/kb/Profiles">Find your Firefox profile directory</a>.</li> <li>Open the <code class="filename">user.js</code> file from that directory in a text editor. If there's no <code class="filename">user.js</code> file, create one.</li> <li> <p>Add these lines to <code class="filename">user.js</code>:</p> <pre class="code">user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");</pre> <p> * Change the url "<a class=" external" href="http://www.mozilla.org" rel="freelink">http://www.mozilla.org</a>" to the site for which you want to enable this function.</p> </li> <li>Save the file, and restart Firefox. The Clipboard buttons should now function.</li>
</ol>
<div class="note"><strong>Note:</strong> The preference is site as well as protocol specific. For example: <br>
<pre>user_pref("capability.policy.allowclipboard.sites", "http://www.mozilla.org")</pre>
<p>is not the same as:</p>
<pre>user_pref("capability.policy.allowclipboard.sites", "https://www.mozilla.org")</pre>
<p>This is because the first uses HTTP while the second uses HTTPS.</p>
</div>
<p>If you want to allow multiple urls to access the Paste operation, separate the urls with a space. For example:</p>
<pre>user_pref("capability.policy.allowclipboard.sites",
 "http://www.mozilla.org https://www.mozilla.org")
</pre>
<p>For more information about security policies, see <a class=" external" href="http://www.mozilla.org/projects/security/components/ConfigPolicy.html">http://www.mozilla.org/projects/security/components/ConfigPolicy.html</a>.</p>
Revert to this revision