Skip to main content

Double-submit CSRF protection for Flask applications.

Project description

# DSCsrf

Very simple and (almost) plug-and-play global CSRF filtering for Flask using the Double Submit technique outlined on OWASP at https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#Double_Submit_Cookies.

How to use:

from dscsrf import Csrf from flask import Flask

app = Flask(__name__)

csrf = Csrf(app)

and that’s it!

For rendering the CSRF token in your application, under your form HTML use:

{{ csrf_token() }}

Project details


Release history Release notifications

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dscsrf, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size dscsrf-1.0.tar.gz (1.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page