• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CSRF and AJAX

#1
[eluser]dianikol85[/eluser]
Hi to all. I'll keep it short.

I make an ajax post request with CSRF on. Because i use the form_open() i can read the coockie. So far so good. Then i pass the token via ajax (using jquery) to the controller.

So what i need to do next in the controller in order to succeed the ajax call?

#2
[eluser]dianikol85[/eluser]
I just found it. I have to set the name of the token within the javascript and in the controller same as it is in the config.php file.

#3
[eluser]coolgeek[/eluser]
There's more on this in the Core forum:

http://ellislab.com/forums/viewthread/176318/


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.