-
Notifications
You must be signed in to change notification settings - Fork 85
How do you secure your GET requests from CSRF? #177
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
Comments
there isn't CSRF protection for GET. There are some middlewares and settings that can help. I can't remember the name of the Django packages that help but there is a list of general security tips at https://docs.djangoproject.com/en/5.1/topics/security/ |
Using GET requests for object actions in the django-object-actions extension (or any framework) can pose significant security risks, particularly in the context of CSRF. Let's break this down in detail: Why Using GET for Actions Is Problematic A CSRF attack tricks authenticated users into performing unwanted actions by making them visit a maliciously crafted URL. Example: https://example.com/admin/app/model/object/action?param=value Violates HTTP Semantics: The HTTP spec dictates that GET should be safe and idempotent, meaning it should not modify server state. Using GET for actions violates this principle. Intermediaries like proxies or browsers might cache GET responses. If your action modifies data or has sensitive side effects, caching can lead to unpredictable behavior. Sensitive data included in GET query parameters may be logged in server logs, browser histories, or analytics systems. Unintentional Triggering: Buttons rendered as links can be triggered by crawlers or accidental clicks. |
essentially a duplicate of #16 |
How do you protect from CSRF when doing GET requests to trigger actions?
The text was updated successfully, but these errors were encountered: