Open Bug 526237 Opened 15 years ago Updated 2 years ago

user.js does not allow Ajaxterm at http://localhost:8022/ to use JS paste

Categories

(Firefox :: Settings UI, defect)

x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jonathan.hayward, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4) Gecko/20091028 Ubuntu/9.10 (karmic) Firefox/3.5.4
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4) Gecko/20091028 Ubuntu/9.10 (karmic) Firefox/3.5.4

I want to use a localhost, port 8022 Ajaxterm's (JS-based) Paste button and I have not found a way to enable it yet.

I have created a user.js with the contents:

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

No observable change in behavior; Ajaxterm still complains that its Javascript paste attempt is getting a permission denied error.

Changing the second line to:

user_pref("capability.policy.allowclipboard.sites", "http://localhost http://localhost:8022");

does not work. I have tried to edit about:config but not found options that look like they will help.

I have more specifically been using modified Ajaxterm, changed in its CSS from Ajaxterm 0.10, available from http://jonathanscorner.com/terminal/ ; there has been no change to the JavaScript. This issue has also been discussed at the Mozillazine thread at http://forums.mozillazine.org/viewtopic.php?f=38&t=1570755&p=7901815#p7901815.

I have upgraded my computer from Jaunty to Karmic; Firefox 3.0.x under Jaunty was allowing the JavaScript paste in question.

Jonathan
http://JonathansCorner.com/

Reproducible: Always

Steps to Reproduce:
1. On a similar system, download and unpack http://jonathanscorner.com/terminal/enhanced-terminal-0.11.tar.bz2 , enter the unpacked directory, and run ./ajaxterm.py
2. Point Firefox 3.5.4 to http://localhost:8022/
3. Select and copy some text.
4: In the browser window, click on the word "Paste" at the top right hand of the screen. [Observed behavior: immediately below the paste button, a message of "Access denied more info" appears]
5: Quit Firefox.
6: Add the following to the user.js file in the <salt>.default directory, creating user.js if needed:
user_pref("capability.policy.policynames", "allowclipboard");
user_pref("capability.policy.allowclipboard.sites", "http://localhost");
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
7: Restart Firefox.
8: Select some text again, and click the paste button. [I get the same error as before attempting to enable access.]
Actual Results:  
As described in the steps to reproduce; each time the "Paste" button is clicked, there is an error message indicating that the script was not allowed to paste via JavaScript.

Expected Results:  
On step 8, the previously copied text should have been pasted into the window as if it had been typed in.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.