GitHunt
TE

testdrivenio/csrf-example

CSRF Protection in Flask

CSRF in Flask Example

Insecure Flask App

Setup

  1. Create and activate a virtual environment

  2. Install the dependencies:

    pip install -r requirements.txt
  3. Run the Flask app:

    python app.py
  4. Serve the index.html from the "hacker" folder with http.server:

    python -m http.server --directory hacker 8002

Languages

Python65.1%HTML34.9%

Contributors

Created October 30, 2020
Updated January 5, 2025