• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ajax with CSRF causing a Double Post to controller

#2
Is the HTML element starting the process a "submit" button? If so, and if the ajax call is made through javascript and the submit button is not prevented doing its default action (with JQuery event.preventDefault() for example) that might explain the process happening twice. Maybe?

That doesn't really explain why the state of CSRF protection makes a difference. There isn't any code in the CSRF checking process that changes the code execution path if the CSRF token is valid.
Reply


Messages In This Thread
RE: Ajax with CSRF causing a Double Post to controller - by dave friend - 10-01-2018, 08:55 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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