Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

pfaut's scratchpad

by pfaut (Priest)
on Jun 01, 2004 at 22:21 UTC ( #358696=scratchpad: print w/ replies, xml ) Need Help??

PerlMonks and JavaScript

There are some inherent security issues involved when browsing with JavaScript turned on. This document attempts to outline where those dangers lie on PerlMonks.

PerlMonks does not use much JavaScript. There are only a few pages, like Recently Active Threads, that use JavaScript. Even those pages can be used effectively with JavaScript turned off.

Users create the content for the site. User entered HTML is checked against a list of allowed tags and attributes to attempt to filter out scripts.

However, users may put anything in their home nodes. Many users have JavaScript in their home nodes. Since anything on the page can react to 'onClick' or 'onMouseOver' events, even things that look benign might activate some scripted action.

Some users who have JavaScript on their home nodes use it to issue warnings to passers-by that JavaScript can be dangerous. Sometimes a message will be sent to the Chatterbox that appears to come from the user activating the script. These uses are fairly harmless.

Other uses are not so harmless. JavaScript code may have access to your browser's cookies. It will most likely have access to your PerlMonks cookie which contains your username and an encrypted form of your password. A script could grab this information and send it as a private message to the user whose home node you are viewing. The person would not be able to log into your account since the password they receive is encrypted but they would be able to use the cookie as-is to impersonate you.

On the other hand, it is possible for you to customize the way the site works for you using the Free Nodelet. You can insert your own HTML and JavaScript in this nodelet to fine-tune the appearance of the site or add new functions. If you turn off JavaScript, you will lose some of the programmability of the Free Nodelet.

PerlMonks can provide some amount of protection against scripts on users' homenodes. In your User Settings page, you can check the option labeled 'Disable some JavaScript on homenodes', but this will provide only partial protection. <script> tags will be commented out but other references to JavaScript, such as event-handling attributes on other tags, will not be affected.

To be perfectly safe, you can go to your browser's setup pages and disable JavaScript. Of course, this will apply to all sites you visit, which may not be desirable. Many sites will not work unless JavaScript is enabled.

Some browsers give you finer control over what JavaScript code can do. If your browser allows this, turn off options that allow access to cookies. You may want to disable other options like manipulating windows.

If you cannot turn off JavaScript, you can still achieve some measure of safety by browsing home nodes while not logged in. Your PerlMonks cookie will not be set and Anonymous Monk cannot send chatterbox messages.


Back to the PerlMonks FAQ
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2014-12-22 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (114 votes), past polls