Win XP: copy/paste busted. ?!?

Here’s a new one for me:

I’m using my XP (sp1) system this evening, and copy/paste decides to stop working altogether. Really. Copy/paste of plain text between 2 apps doesn’t work. Copy/paste in the same app doesn’t work. It had been working – I had just pasted an URL into an e-mail, then tried to paste another, and I couldn’t. And so far I can’t coax it into working again. At all.

I’ve tried ctrl-c/ctrl-v, edit menu->copy/paste, right-click->copy/paste. Paste is always dimmed if I use a menu item. I’ve tried copy/pasting to/from IE, Eudora, Notepad, Calc, Word, etc. Paste is always dimmed.

I’ve restarted the machine of course - no joy. McAffee and Adaware found zip. Ideas?

Go to start->run and type clipbrd

This program is the clipboard viewer. You can see if the copy function works.

A light dawns:

If I go to this url (the one I was pasting when the clipboard stopped working)
http://www.factorydirectsound.com/speakers/klipsch/rb-15.html

…then copy/paste stops working until I restart my machine.

How can a web page break the clipboard?

Correction: copy/paste is disabled until I close that web page. Once it’s closed, copy/paste works fine.

Someone please try this and tell me if they’re not seeing the same thing (on win XP sp1, of course). Thanks.

This is primarily because you are running a gaping security hole called “Internet Explorer”. IE has a hacker-friendly nonstandard JavaScript function called “clipboardData()” which lets arbitrary JavaScript programs read from or write to the clipboard. (Of course, JavaScript can also send this data to arbitrary websites as well; do you ever copy and paste non-public information? … Well, you thought it was private, anyway!)

[Note: some previous versions of Mozilla had a security hole that allowed one to read the clipboard with some clever programming; this has AFAIK been fixed. (Microsoft: What other people call “security holes” we call “enhanced features”!) The clipboard still works under Mozilla for the given web site, however. Switch to Mozilla/Firefox. It’s so much better than IE there’s really no comparison.]

Anyway, that web site is clearly designed by people who are under the misapprehension that some loser might want to steal their code, so they’ve overpaid someone else (“WebLockPro.com”) to obfuscate their webpage. (Sudden thought: maybe they’re just too embarrassed to let anyone else look at it… that makes more sense.) This just makes reading the code a little more tedious, though. The relevant section of code is this JavaScript snippet (I’ve reformatted the HTML code string _fc to make it more readable; the tags are broken up in the original to avoid parser errors):


<script language=javascript>
  if (document.all) {
    _fc = '<div style="position:absolute;
                       left:-1000px; top:-1000px;
                       width:60px; height:35px;
                       z-index:1">
           <input type="button" name="_xqq" value=""
                  onClick=_ccd() style="visibility:hidden">
           </div>';
    document.write(_fc);
  function _ccd() { clipboardData.clearData() };
  function _cce() { _xqq.click(); setTimeout("_cce()",300) };
  setTimeout("_cce()",1000);
}

This is more evidence for the “too embarrassed to let you see our code” hypothesis above. Just look at this spaghetti! The hidden button named “_xqq” calls function _ccd() when clicked. Function _ccd() clears your clipboard. Function _cce() , when called, presses the button _xqq and then calls itself 300ms later; that is, once called, it clears the clipboard every 300ms. The final line calls _cce() after a 1s delay.

So, basically, this stupid little JavaScript code is clearing your clipboard every 0.3 seconds until you kill the page. I’m tempted to recommend that you buy from someone smarter, but maybe that doesn’t belong in GQ.

How did you find the script? The page won’t load with javascript disabled. Also the View Page Source (I’m using Firefox) returns <Page protected by WebLockPro.com>

Did you use some interceptor?

That’s what it looks like, yes, but all you have to do is to scroll down a bit… and to the right. There are 200 empty lines, and then every line starts with 150 spaces. The first line contains an un-obfuscation script that is then used to decode the rest of the page.

Rather embarrasing, really…

Yup.

The thing I don’t understand is… Why? I mean, web pages are supposed to be looked at, right? Don’t they want people to read them and buy their stuff? All the valuable data is stored on the server side; it’s not like the <table> tag is some big secret or something.

I guess I could sort of understand the goal if the site was trying to rent copyrighted material (e.g., streaming audio while trying to protect it from being saved as MP3), but this site is trying to sell speakers! (Ah, management.)

Wow, I’m amazed that the scripting would allow a web page to disable the clipboard system wide, not just on that page.

Thanks for the analysis, Omphaloskeptic et. al.

Something similar happened to me. It turned out to be the mouse driver. :smack: :wally :dubious:

It took me all night to figure that out.