Do the Opera people have any clue how much of a security breach this
script is?
In Greasemonkey, GM_setValue and GM_getValue are, by definition,
private; their existence, let alone their contents, are known only to
the user and the browser. Cookies are, by definition, shared between
the browser and the server. By simulating these private objects with
cookies, you are causing Opera to transmit possibly sensitive
information to some server on the internet without the user's
knowledge or consent - information that the script writer expected
would remain private.
The Greasemonkey developers have worked long and hard to ensure that a
Web site manipulated by a Greasemonkey script CAN'T detect the
existence or use of that script (unless the script itself is poorly
coded); your Opera Gm fakeout script drives a big fat hole thru that.
Consider this scenario:
- I come across <
http://nasty.example.com/>, and find some of what's
there to be of interest, but I also find using the site to be, well,
nasty.
- I write a Greasemonkey script to make the site less nasty to use -
one that happens to use GM_setValue and GM_getValue.
- I publish my script, and many other users of Nasty download it.
- Nasty gets wind of my script, and, being what they are, decides they
don't like the idea of people un-nastying their site - but they can't
do a thing about it, because they have no way to tell that it's
happening.
- Some Opera user gets a hold of my script, and decides he wants to
try it - only to find it's not fully compatible with Opera. He's not
a programmer, but does a little Googling, and finds this other script
that claims to make Greasemonkey scripts more compatible, installs it,
and, lo and behold, it (seemingly) works!
- Nasty starts noticing these strange cookies being transmitted to
their servers, and, while they may be Nasty, they're not dumb, so they
figure out that they can detect that detested Greasemonkey script
whenever someone's ignorant enough to install it on Opera.
- Nasty systematically shuts out all Opera users.
or worse,
- Nasty secretly collects the info transmitted in these cookies by
unwitting Opera users, and uses it in whatever way they can to make
those people's lives miserable.
So, in closing, what's the best way to detect this piece of crap in
order to avoid using it?