Live data from Hacker News

Don't touch my clipboard

alexanderell.is

81–90 of 322 posts

Re: Don't touch my clipboard

#81
post #50

This happened to me recently and it was pretty embarassing - I copied a two paragraph snippet from a psychology paper and the website put an ad for CBD oil in my clipboard above the paragraphs. The segment I copied was just long enough that it overflowed my chat window so I had no idea the insertion was even there and I sent it as-is. The recipient called me about two minutes later and said "hey, I think you've been…

That's kind of hilarious actually.

This highlights the tension between the document-web and the app-web. What if the page is an image editor, word processor, spreadsheet? These app-web pages need custom logic for copy and paste. Unfortunately, bad actors (like what you found) ensure browsers cannot implement this stuff properly, because every feature is now a way to shove a new ad in.

Re: Don't touch my clipboard

#82
Seriously... I want to know the business/legal logic behind adding copyright messages to the clipboard when copying. This has happened for a long time with news sites, Apple Books, etc.

No user ever has ever wanted that.

So what lawyers, where, ever demanded it, and why? Short snippets fall under fair use anyways... and even if it didn't such a message doesn't prevent anything (you just delete it after pasting)... and it you were oblivious to how copyrights worked before, this isn't going to teach you.

So it's UX annoyance but why? Not only does it not provide an obvious legal benefit to any party, I don't even see how it's legally covering anyone's ass? Like, I know how under trademark law companies have to warn people against using their trademark generically or else they can lose it -- so as dumb as it is to get an e-mail from Adobe asking you not to use "Photoshop" as a verb in your press release, I get it. But copyright... doesn't work like that.

So how/why did this become a thing? I just don't understand the legal rationale here.

Re: Don't touch my clipboard

#83
post #51

It's not just a browser thing. Apple Books does this with their e-books, which is infuriating if you're working with a coding book and just want to copy-paste stuff into your editor/terminal. You get something like: “ghci> putStrLn (pretty 10 value)” Excerpt From: Bryan O’Sullivan, John Goerzen, and Donald Bruce Stewart. “Real World Haskell.” Apple Books. When you only copied: ghci> putStrLn (pretty 10 value) Note th…

If your shell has a function for copy and paste integration (like fish), just override it with a sed script to remove that crap. Same for vim’s clipboard integration.

Re: Don't touch my clipboard

#84

The wrongest thing about this, from my perspective, is that my browser fires off a js 'copy' event when I press control-c. There are times when I've found it helpful that a browser can copy text to my clipboard when I click a button, but I can't think of a single time when I want a site to react to my attempt to copy text off if it. Is there any way to configure my user agent (Firefox) not to do this? A hack is ok.

Under X11, Firefox sets the primary selection correctly and middle-click paste is unaffected. This site also renders fine with JS blocked. That is a useful default to prevent this kind of crap from interfering with you.

What is infuriating is CSS that prevents text selection in the first place. That insult to usability should have never been adopted by browsers.

Re: Don't touch my clipboard

#86

Seriously... I want to know the business/legal logic behind adding copyright messages to the clipboard when copying. This has happened for a long time with news sites, Apple Books, etc. No user ever has ever wanted that. So what lawyers, where, ever demanded it, and why? Short snippets fall under fair use anyways ... and even if it didn't such a message doesn't prevent anything (you just delete it after pasting)... a…

Attorney here! (Not legal advice; consult a licensed attorney in your jurisdiction.)

I am skeptical that this is a copyright issue that raised an attorney's attention. It's far more likely IMO that this was a contractual obligation imposed by the publisher.

I have no insider knowledge as to whether this is actually true, but it's quite probable that in exchange for allowing Apple Books to republish their content, the publisher required Apple to append this attribution when copying content into the clipboard. In theory, preserving such an attribution might cause more copies to be sold.

Also, contrary to your assertion, not every short snippet qualifies for a Fair Use defense; there's a four-factor test that courts apply, and the length is just one of those factors. But again, I think this less to do with copyright and more to do with a business arrangement.

Re: Don't touch my clipboard

#87
post #67
post #51

It's not just a browser thing. Apple Books does this with their e-books, which is infuriating if you're working with a coding book and just want to copy-paste stuff into your editor/terminal. You get something like: “ghci> putStrLn (pretty 10 value)” Excerpt From: Bryan O’Sullivan, John Goerzen, and Donald Bruce Stewart. “Real World Haskell.” Apple Books. When you only copied: ghci> putStrLn (pretty 10 value) Note th…

My instinct is that this is for legal attribution purposes, i.e. a legal moat. It sounds ridiculous, but in my experience, there are 1000 things that lawyers will identify as possible sources for legal trolling and this looks like that. Apple has a zillion dollars in the bank and they are sued daily. All it takes is for a judge who may nor not be knowledgable or a sufficiently grey area ... and you have a major probl…

Unlikely - see my comment elsewhere in this post.

Re: Don't touch my clipboard

#88
post #39

Earlier quoted context omitted.

I think the wrongest thing is that this is a clear attack vector... make a site with helpful Linux shortcuts, then replace every copy with "curl malicious script and run it, plus a newline to make it run immediately"

> plus a newline to make it run immediately I already mentioned this in another comment, but everyone should enable bracket paste mode in their shell to defend against this. https://cirw.in/blog/bracketed-paste

I always just type "#" first before pasting... That way it is just a comment I can inspect before running

Re: Don't touch my clipboard

#90
post #39

Earlier quoted context omitted.

I think the wrongest thing is that this is a clear attack vector... make a site with helpful Linux shortcuts, then replace every copy with "curl malicious script and run it, plus a newline to make it run immediately"

> plus a newline to make it run immediately I already mentioned this in another comment, but everyone should enable bracket paste mode in their shell to defend against this. https://cirw.in/blog/bracketed-paste

Thanks for the safety net tip. I might be more methodical than most, but in copying commands from external sources (ie, ~anything other than my own code or notes), I paste into a local buffer to examine and confirm contents. I do this as both as a means to generate documentation as well as for hygiene per se -- and it occasionally helps to sanity check my intention and prevent a footgun.
Post reply on HN