Welcome Guest, Not a member yet? Register   Sign In
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



Theme © iAndrew 2016 - Forum software by © MyBB