Clipboard and Javascript

Recently I got a forward which stated that we should be carefull with using our Clipboard. For those who don't know about clipboards, it is used for short time data storing. When we copy some text, they are placed in your clipboard. Interestingly Javascript can be used to access this clipboard data. If you are placing some important data in it(while usign copy, cut or CTRL + C) and accessing some page that has a Javascript code to get the information from your clipboard, then there are chances that you send your vital information.



You know what, just a single line of code is used above. Just press the button and you will see your clipboard data popping up. Works in Internet Explorer, and Latest version of IE alerts you whenever anything is trying to Access the Clipboard so that you can safely deny access.

Once this vital information is obtained, anyone can send the data without the knowledge of the person viewing the website. So beware of placing Contents into your Clipboard.

To overcome from this problem in Internet Explorer
1. Go to internet options->security.
2. Press custom level.
3. In the security settings, select disable under "Allow paste operations via script"
or you may see this option "Allow Programmatic Clipboard Access".

0 comments:

Post a Comment