django - csrf_token cookie deleted by another site? -
I have a site that runs on 1.2.1, and once my users lose a lot of work because csrf_token Cookie does not exist and page errors come out with a 403 error on post. I've narrowed it down to another site (which is my users often) Cookie is removing me This site does with the ActiveX ClearAuthenticationCache command
remove CSRF protection Area than any other problem?
Thank you, Pete
You can use the fact that cookies The required value is still present on the page, and use javascript to recreate the cookie before submitting. Hook on the submit button and add something like
document.cookie = 'csrfmiddletoken =' + $ ("input [name = 'csrfmiddletoken']"). Val ()
Comments
Post a Comment