starlette-csrf

Starlette middleware implementing Double Submit Cookie technique to mitigate CSRF

MIT License

Downloads
15K
Stars
61
Committers
2

Bot releases are visible (Hide)

starlette-csrf - v3.0.0 Latest Release

Published by github-actions[bot] about 1 year ago

Bump version 2.0.0 → 3.0.0

Breaking changes

  • Drop Python 3.7 support
starlette-csrf - v2.0.0

Published by github-actions[bot] over 1 year ago

Bump version 1.4.5 → 2.0.0

Breaking changes

  • Initializer arguments other than app and secret are now keyword-only.
    • This shouldn't affect you if you add the middleware normally using Starlette's Middleware or FastAPI's .add_middleware.

New features

  • Add a required_urls argument to set route patterns where CSRF should always be enforced, no matter the method or cookies present.
    • Useful to prevent attacks like Login CSRF.
    • Thanks @bkis for the idea and feedback
starlette-csrf - v1.4.5

Published by github-actions[bot] almost 2 years ago

Bump version 1.4.4 → 1.4.5

Improvements

  • Bump starlette >=0.14.2
  • Use Hatch for package management
starlette-csrf -

Published by frankie567 over 2 years ago

Improvements

  • Rewrite as a pure ASGI middleware, without BaseHTTPMiddleware as it's now deprecated.
  • Bump dependencies:
    • starlette >=0.14.2,<0.21.0
starlette-csrf -

Published by frankie567 over 2 years ago

Bug fixes and improvements

  • Bump dependencies:
    • starlette >=0.14.2,<0.20.0
    • itsdangerous >=2.0.1,<3.0.0
starlette-csrf -

Published by frankie567 over 2 years ago

Fixes and improvements

  • Put submitted CSRF token retrieval logic in a separate method _get_submitted_csrf_token for easier overloading.
starlette-csrf -

Published by frankie567 over 2 years ago

Bug fixes and improvements

  • Bump dependencies:
    • starlette >=0.14.2,<0.19.0
starlette-csrf -

Published by frankie567 almost 3 years ago

New features

  • The error response logic is now in its own separate method to ease overloading in case you need a custom error response. [Documentation]

Improvements

  • Bump packages:
    • starlette >=0.14.2,<0.18.0
starlette-csrf -

Published by frankie567 about 3 years ago

New features

  • Allow to exempt some routes from CSRF protection following Regex patterns. Thanks @lsapan 🎉

Improvements

  • Bump packages:
    • starlette >=0.14.2,<0.17.0
    • itsdangerous ==2.0.1
Package Rankings
Top 6.5% on Pypi.org
Badges
Extracted from project README
build codecov PyPI version Downloads
Related Projects