-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default CSRF validation with django #20
Comments
Can you please provide more details? I did not see this problem before. |
I have 188 selected values. I'm using google chrome. It seems that my document.cookie can only take 75 of them before it starts replacing the ones it just set and the csrf token too in setCookie in heavy_data.js. |
I got it working by replacing the cookie code in heavy_data.js with https://github.com/marcuswestin/store.js |
Oops. Good catch! Yes there is usually a max limit of 4KB limit on cookies. In your case you are hitting that at 75 elements. I will incorporate your suggestion in heavy_data.js. |
Please update to latest version. Noe django_select2 does not use cookies or localStorage at all. |
In heavy_data.js your overriding the cookie which is used for CSRF in django forms.
Form submission fails with:
Forbidden (403)
CSRF verification failed. Request aborted.
Reason given for failure:
CSRF cookie not set.
The text was updated successfully, but these errors were encountered: