Best way to secure AJAX requests in CI? |
[eluser]industrial[/eluser]
[quote author="umefarooq" date="1257969656"]i just google and found some jquery encryption plugins try these to scure you data, google more you will find more plugins you can use both way in CI and JQuery http://plugins.jquery.com/project/blowfish[/quote] Hi! I am a bit unsure if encryption is the way to go. As I see it, the problem with using encryption lies in verifying that the data actually is decrypted and not just rubbish. How could this be solved? I mean, it wouldnt be that great to have server busy with doing queries on an non existant "AAQe3gALiwaTyyOY0py0wA=="-value... What about setting up a session with an encrypted value, send the value together with the form data, decrypt the value and validate it, like a password? [quote author="Phil Sturgeon" date="1257970346"]Don't forget that nobody can make AJAX requests to your server unless you specifically allow them to. They can do plenty of other things, but that is ONE thing you don't need to worry about.[/quote] Hi Phil! First, thanks a lot for your contribution with your cache library! Is no one available to make AJAX requests due to settings in Codeigniter or is it a serverside limitation? I found this snippet online that is supposed to only allow Ajax requests to a PHP file. You mean that this is already useless? Code: if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { Thanks! |
Messages In This Thread |
Best way to secure AJAX requests in CI? - by El Forum - 11-11-2009, 07:34 AM
Best way to secure AJAX requests in CI? - by El Forum - 11-11-2009, 08:00 AM
Best way to secure AJAX requests in CI? - by El Forum - 11-11-2009, 08:12 AM
Best way to secure AJAX requests in CI? - by El Forum - 11-11-2009, 02:20 PM
Best way to secure AJAX requests in CI? - by El Forum - 11-11-2009, 09:55 PM
Best way to secure AJAX requests in CI? - by El Forum - 11-12-2009, 12:04 AM
Best way to secure AJAX requests in CI? - by El Forum - 11-12-2009, 11:39 AM
Best way to secure AJAX requests in CI? - by El Forum - 11-12-2009, 01:46 PM
|