JS Source of "Osama Execution" Facebook Worm
pastebin.com
pastebin.com
count++; // increment counter
http1.close; // Close the connection
Maybe this is all part of the ruse.I checked 'lm741' and they have a karma of 1 but joined a while ago, so has this not been voted up (and is risky) or did they previously get slammed and this has been voted up (and is probably safe)?
[I clicked the link and voted lm741 up as it seems safe enough; just commenting on a side value of the visible vote count that we no longer get.]
- Found the following issue for Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=305692
- Found the following issue for Chrome: http://code.google.com/p/chromium/issues/detail?id=6888
Ctrl+C,Alt+D,Ctrl+V,Home,j-a-v-a-s-c-r-i-p-t-:,Enter!
I guess if you can convince people that you have something they want, you can make them do almost anything to their poor browser :(
I've been seeing these "copy this JS in your URL bar to get free cookies/sex/money/nothing" for over a year now.
document.addEventListener('copy', function(e){/javascript:/.test(document.getSelection()+'') && e.preventDefault();}, true)
be added to every facebook page (via the fbml sandbox or something to prevent users from copying bookmarklets as they are profoundly dangerous and do much more harm than good on a social networking site. (Note, that the above code is just a prototype, it's quite incomplete in that it doesn't support IE and probably leaves a gaping hole for someone to use clipboardData.setText)Two thoughts:
1. Disabling Javascript execution via the address bar is not something Facebook is capable of doing, any more than a random web developer can disable your ability to view the HTML of a page. Protection at this level is up to the browser developers.
2. That being said, I believe these kinds of phishing attacks demonstrate a lack of understanding on the part of end-users regarding what javascript: URIs can do. It's hard to protect users from themselves. ;-)
Edit: Just tested again on Windows 7. Pasting javascript:alert(1) caused the javascript: part of the URI to be stripped.