| Article: |
Avoid Common Pitfalls in Greasemonkey | |
| Subject: | Security of wrappedJSObject | |
| Date: | 2008-01-02 16:23:49 | |
| From: | Lunatic_Lycanthrop | |
I don't fully understand why is wrappedJSObject insecure. For example, as a workaround to the "style" attribute problem, you could use the following code:... and so, yo could set a large amount of attributes in only one string.
|
||
Showing messages 1 through 2 of 2.
-
Security of wrappedJSObject
2008-08-24 00:12:32 gaudio [View]
-
Security of wrappedJSObject
2008-02-26 14:42:33 DeBa [View]
I ask myself the same question. The answer I found is in this article above on Page 1-2. It is unsave, because your Greasemonkey - script could be trapped and stopp running on the site.



If I'm not mistaken, this remote script could be written to grab a hold of some of the privileged objects, especially GM_xmlhttpRequest, and start going crazy with it.
What's really needed is the ability to drop out of the sandbox when calling a method defined from the remote page, whether directly or via an object. Of course, this guide was written about 0.3 Greasemonkey versions ago, so perhaps it's become a bit more secure.