Click here to Skip to main content
11,704,768 members (52,356 online)
Click here to Skip to main content

Javascript Injection at it's Finest!, without even using Eval()!

, 15 May 2011 CPOL 4.4K 1
Rate this:
Please Sign up or sign in to vote.
They need to make javascript only execute in scoped containers within the browser. Don't ask me how, I'm sure the browser companies can make some kinda sandbox element.
They need to make javascript only execute in scoped containers within the browser. Don't ask me how, I'm sure the browser companies can make some kinda sandbox element.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

M@dHatter
Software Developer (Senior) Codevendor
United States United States
Please visit my personal website http://www.codevendor.com for my latest codes and updates.

You may also be interested in...

Comments and Discussions

 
GeneralI disagree. JavaScript is MADE to extend via the prototype i... Pin
Tatsh16-May-11 5:32
memberTatsh16-May-11 5:32 
I disagree. JavaScript is MADE to extend via the prototype in each object (although you should not expect this to work on every client, especially IE/JScript).

We have a ways to go in terms of security but verifying JSONP requests and CORS are where we are headed (CORS is possible since IE 8 with the XDomainRequest object, on other browsers XHR Level 2). What are we concerned about here? JavaScript injection has always been possible.

You have to be very careful what people POST and GET via HTTP in general, not just Ajax requests. Never trust any input from the client side, ever. It must be scraped, cleaned, sanitised, whatever you must do to ensure it is not an attack attempt.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150819.1 | Last Updated 15 May 2011
Article Copyright 2011 by M@dHatter
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid