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 exempt? #5

Closed
deronsizemore opened this issue Oct 6, 2014 · 4 comments
Closed

csrf exempt? #5

deronsizemore opened this issue Oct 6, 2014 · 4 comments
Assignees

Comments

@deronsizemore
Copy link

I noticed in the image upload view, there's a decorator for csrf_exempt. I admit I'm not anywhere near a django expert, but I was under the impression the csrf token was there as a way to block rogue form submissions? Or to ensure the form submission came from where you think it came from?

If the image upload is csrf exempt, I assume that means it doesn't need a csrf token to upload images? Assuming that's accurate, what's to stop someone from viewing the html source of my page, grabbing the froala image upload path setting and uploading some kind of harmful code to my image directory from their own form?

@isDipesh isDipesh self-assigned this Oct 12, 2014
@isDipesh
Copy link
Contributor

Fixed with the latest update.

@deronsizemore
Copy link
Author

Thanks. I run pip install django-froala-editor --upgrade and it tells me it's already up to date. How do I install this latest update?

@isDipesh
Copy link
Contributor

pip install django-froala-editor --ignore-installed

@deronsizemore
Copy link
Author

The only way I'm able to get an image to upload is if I add back the @csrf_exempt decorator. Any ideas what I'm doing wrong here? Gives me a 403 error in terminal if exempt decorator isn't in place.

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

2 participants