[Greasemonkey] bug 11423

Aaron Boodman zboogs at gmail.com
Tue Aug 30 15:02:55 EDT 2005


On 8/30/05, Bill Donnelly <donnelly at snowcrest.net> wrote:
>  Can you still interfere with other people's scripts if they are in a
>  
>  (function() {
>  })()

Yes. All the APIs for all the scripts will get added to the sandbox
before the script runs. Then before each individual script runs, it's
specific APIs get copied into the local scope.

GM_xmlhttpRequest = __magicAPIs[myApis].GM_xmlhttpRequest;
GM_log = __magicAPIs[myApis].GM_log;
... etc ...

This means that a bad script could do this:

delete __magicAPIHash.

Then none of the scripts would get their APIs anymore and they
wouldn't work. But again, a bad script can do way worse than that.

-- 
Aaron


More information about the Greasemonkey mailing list