Archive for June 5, 2006

Same origin policy

With so much AJAX based web applications coming out in full swing one has to be aware that there is lot of javascript coding that runs on the user’s machine. That could mean security vulnerabilities. Think about this situation. A user is using an AJAX based web application and simultaneously he/she has a browser window opened that is connected to his/her online banking. What if the AJAX application sent an AJAX request to the bank making it look like a request from the banking application? If the bank application responded back with confidential information, the AJAX site could then update it back to its site. This would lead to a heavy security breach. Mozilla’s same origin policy helps in blocking such malicious requests. When a browser instance connects to an application on the server, it gets bound to three items viz., protocol, port (if provided) and host/domain. The browser does not allow communication from a javascript to be sent to a URL if any one of these three is different from the application’s URL. If you are an AJAX developer keep this in mind and do not try to make an AJAX request to a different URL from the javascript of your application. It won’t work.

Blink this Same origin policy at blinklist.com    Bookmark Same origin policy at blogmarks    Bookmark Same origin policy at del.icio.us    Digg Same origin policy at Digg.com    Fark Same origin policy at Fark.com    Bookmark Same origin policy at Furl.net    Bookmark Same origin policy at NewsVine    Bookmark Same origin policy at reddit.com    Bookmark Same origin policy at Simpy.com    Bookmark Same origin policy at Spurl.net    Bookmark Same origin policy with wists    Bookmark Same origin policy at YahooMyWeb

Comments      Cosmos


Creative Commons License  This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.