ASGI middleware for protecting against CSRF attacks
Project description
asgi-csrf
ASGI middleware for protecting against CSRF attacks
This is a preview release - do not assume that this is robust and secure just yet.
Installation
pip install asgi-csrf
Background
See the OWASP guide to Cross Site Request Forgery (CSRF) and their Cross-Site Request Forgery (CSRF) Prevention Cheat Sheet.
This middleware implements the Double Submit Cookie pattern, where a cookie is set that is then compared to a csrftoken
hidden form field or a x-csrftoken
HTTP header.
Limitations
- Brand new. Not extensively tested. Do not trust this yet.
- Currently only works for
application/x-www-form-urlencoded
forms, notmultipart/form-data
forms (with file uploads)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for asgi_csrf-0.2.2a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d99bdb2fc81180a8fd8ca15433de2e94eb0b9ed71bc752893213cdc5dcab70c |
|
MD5 | c5d21f5136675ea4bd45e42e1d84ae68 |
|
BLAKE2b-256 | 3fc9e772f521e31bc8eb3de0c81c8d81c8448aed92c25bdad5cafea3ea0fe8c6 |