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 | RSS feed

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.

Source Distribution

dscsrf-1.0.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file dscsrf-1.0.tar.gz.

File metadata

  • Download URL: dscsrf-1.0.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dscsrf-1.0.tar.gz
Algorithm Hash digest
SHA256 78220c79d3b3779cd30dc1a9d53942d65a1ea472f6623046caa940922819b7a3
MD5 b9b6197716f1c6542ce50f8aadbe887b
BLAKE2b-256 32d7dd4308e0afa261d44823584c06be54daad36cfbb4496ea93d08def58cd75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page