Ajax with CSRF causing a Double Post to controller |
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. |
Messages In This Thread |
Ajax with CSRF causing a Double Post to controller - by Chroma - 10-01-2018, 05:51 AM
RE: Ajax with CSRF causing a Double Post to controller - by dave friend - 10-01-2018, 08:55 AM
RE: Ajax with CSRF causing a Double Post to controller - by Chroma - 10-01-2018, 12:53 PM
RE: Ajax with CSRF causing a Double Post to controller - by jreklund - 10-01-2018, 10:52 AM
RE: Ajax with CSRF causing a Double Post to controller - by Chroma - 10-01-2018, 12:56 PM
RE: Ajax with CSRF causing a Double Post to controller - by qury - 10-03-2018, 02:37 AM
|