Block websites from reading or modifying Clipboard contents in Firefox
Depending on how a website is configured, it may be able to read or modify Clipboard events that happen on it. Say, you highlight text on the site to copy it to the clipboard of your operating system to paste it into another application.
A script could record what you are copying, or, to take it to another extreme, modify the contents. Some services may for instance add copyright information to the copied text automatically.
A website could also use these events to block you from copying any contents, again by manipulating the event so that nothing is returned.
Other possibilities include preventing paste operations on the site, so that you cannot paste data into form fields but have to type it instead.
Besides being annoying, as you may get a different result than expected, it does have privacy implications as well as sites can log what users paste -- into text areas only I assume -- as well.
dom.event.clipboardevents.enabled
Firefox has a preference for that, to stop that behavior in its tracks. There may be a downside however to it which needs to be mentioned.
If you are working with rich text editors on the Internet, some may require that those events remain enabled for functionality. A basic example is an editor that processes the text that you are pasting in it to remove all formatting information from it.
To block sites from reading or modifying Clipboard contents in Firefox, do the following:
- Type about:config into Firefox's address bar and hit the enter key on the keyboard.
- Confirm you will be careful if a warning message pops up.
- Use the search up to to find the dom.event.clipboardevents.enabled preference.
- The default value of the preference is true, which means that sites can intercept Clipboard events.
- Double-click the preference to change its value to false.
- Once set, it will block sites from intercepting these events.
Tip: I suggest you monitor your online activities to see if any online editor or site behaves in a different way after you have disabled the feature.
There is unfortunately no option to enable it for individual websites.
Anyway, I highly suggest you set the value of the preference to false to block websites from manipulating Clipboard events in the web browser.
Advertisement
I have a question relating to privacy.
If the last thing I highlighted and copied is sensitive information, can a website I visit copy this from my clipboard?
Absolutely yes. This “feature” is a highly insecure POS that should be made illegal, it has no upside.
I was trying to copy text from the Economic Times, but the website kept trunkating it and adding a URL with a source code added to it saying that it was copied. I was using Chrome. Is there any way to keep websites in Chrome from modifying the clipboard? (If there isn’t, I can use Firefox when reading news.)
is there an add on to toggle back and forth. eg youtube requires false while facebook needs true (if you are copying text as a comment eg a photo_)
Hi, I have an addon for Firefox 39.0 that can read the clipboard contents. Any text I have stored in the clipboard is then visible in the addon – Any idea how it’s doing this or how I can deactivate it – I wonder if websites can do this also? Thanks
if you have a CMS: setting dom.event.clipboardevents.enabled = false will break the TinyMCE editor in wordpress (prevents pasting), possibly other editors as well
false = you are unable to paste text on a facebook comment (without the botton Share).
Well after setting it to false, some forms aren’t automatically filled and that the only change that I can attribute that behavior to so I set it back to true.
We’ll see.
Another potential problem might be sites like TinyURL that give you a Copy To Clipboard llnk when you have the following set to true.
signed.applets.codebase_principal_support
Thanks Martin, I was unaware about this security issue.
Sometimes I need to copy passwords from my security vault to paste somewhere else, so that´s a big deal to me.
Thanks for the tip. Never realized that the clipboard could be accessed through Mozilla browsers.
The first site I tried with the setting was my GMail calendar; trying to change the date on an appointment crashes the site. Oh well.
Thanks for the info.
There’s an add-on too.
Disable clipboard manipulations 1.0.1
“Web pages will no longer be able to listen to copy, paste and cut events to learn what you are copying or pasting, they won’t even know that you do it at all. And they won’t be able to interfere to push unwanted content to your clipboard when you copy text.”
I was about to comment the exact same thing. Here is the link for the lazy: https://addons.mozilla.org/en-US/firefox/addon/nocopypaste/
Tor browser has that set to true maybe they are not aware of it should you tell them?
Finally!!! There has always been a setting in IE’s internet options, going back as far as I can remember, to disable clipboard access, and I have always made it a point to do so in every computer I service. But, I’ve never known the way to disable clipboard access in Firefox, until now. Thanks!
Now, I need to find out how to do this with Chrome.
Does the Chrome version of AdBlock Plus have an option to block clipboard manipulations? Seems to me I read something about that.
Very important, obviously, if one uses long-and-strong passwords and copy-pastes them from a file or utility on the PC.
I know that makers of Adblockplus have separate extension to do exactly that in Firefox. Chances are that they have something like that for Chrome.
Excellent advice. Thank you.