[Greasemonkey] Use external library

Aaron Boodman zboogs at gmail.com
Thu Oct 27 20:21:01 EDT 2005


On 10/27/05, Gareth Andrew <freega at freegarethandrew.org> wrote:
> It's explicitly disallowed, i figured its a security bug eg.
> //@import file:///path/to/secret/file
> ...
> xmlhttprequest.send(secrets);

Be careful with this. I got bit by:

if (foo.file.indexOf("file:///") == 0) {
  send(foo.file);
}

but foo.file was a getter and returned a different path the first time
than the second time. To be safe, you want to copy the path string
into a local, then test and use that:

- a


More information about the Greasemonkey mailing list