Click here to Skip to main content
Click here to Skip to main content
Alternative Tip/Trick

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

, 15 May 2011 CPOL
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.

Comments and Discussions

 
GeneralI disagree. JavaScript is MADE to extend via the prototype i... PinmemberTatsh16-May-11 6: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
Web02 | 2.8.150123.1 | Last Updated 15 May 2011
Article Copyright 2011 by M@dHatter
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid