Skip to content
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

CSRF verification failed. Request aborted. #70

Closed
darkicex3 opened this issue Jun 17, 2016 · 4 comments
Closed

CSRF verification failed. Request aborted. #70

darkicex3 opened this issue Jun 17, 2016 · 4 comments

Comments

@darkicex3
Copy link

Hi !

I got this error -> CSRF verification failed. Request aborted.
On this view -> /s3direct/get_upload_params/

Thanks

@bradleyg
Copy link
Owner

bradleyg commented Nov 3, 2016

I can't reproduce. Please reopen if you are still having this issue.

@bradleyg bradleyg closed this as completed Nov 3, 2016
@cordery
Copy link

cordery commented Jan 18, 2017

This will happen if CSRF_COOKIE_HTTPONLY = True. Set to false or comment out. Would be preferable if django-s3direct pulled the csrftoken from the hidden csrftoken form field instead of from the cookie so this setting wouldnt have to be disabled.

tadeo added a commit to tadeo/django-s3direct that referenced this issue Feb 3, 2017
Allows to run with setting CSRF_COOKIE_HTTPONLY = True
Fixes Issue bradleyg#70
@tadeo
Copy link
Contributor

tadeo commented Feb 3, 2017

I was getting the error at production under HTTPS, thanks @cordery for pointing me to the solution!

@bradleyg
Copy link
Owner

Reopening per @cordery's findings (CSRF_COOKIE_HTTPONLY) and @tadeo's PR.

@bradleyg bradleyg reopened this Feb 14, 2017
jooi-urbandaddy pushed a commit to tebesfinwo/django-s3direct that referenced this issue Jul 11, 2017
Allows to run with setting CSRF_COOKIE_HTTPONLY = True
Fixes Issue bradleyg#70
bradleyg pushed a commit that referenced this issue Nov 16, 2017
…#94)

* Take CSRF token from csrfmiddlewaretoken field instead of from cookie

Allows to run with setting CSRF_COOKIE_HTTPONLY = True
Fixes Issue #70

* Fallback CSRF token to cookie if no csrfmiddlewaretoken field is present for backward compatibility

* Merge branch 'master' of https://github.com/bradleyg/django-s3direct

* Added in support for

* Added in support for CSRF_USE_SESSIONS = True

If this is turned on, there is no CSRF cookie.

* Added in fallback for CSRF_USE_SESSIONS = False

* Fixing merging error

* Semicolon --> comma

* feat: take CSRF token from csrfmiddlewaretoken hidden field also for getAwsV4Signature

* fix: update bundled.js to include recent CSRF token handling at scripts.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants