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

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -