Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy/adapt latest CSRF filter improvements #5

Open
ThrawnCA opened this issue Jun 17, 2022 · 0 comments
Open

Copy/adapt latest CSRF filter improvements #5

ThrawnCA opened this issue Jun 17, 2022 · 0 comments

Comments

@ThrawnCA
Copy link

There have been significant improvements to https://github.com/qld-gov-au/ckanext-csrf-filter since its code was adapted for this extension. It could be beneficial to copy these changes.

Improvements include:

  • Tokens use HMAC signatures with a server secret, to ensure that they cannot be forged.
  • Token rotation is more robust, using a timestamp built into the token, and expired tokens are rejected.
  • Added support for intercepting login form to prevent Login CSRF.
  • Code has been refactored for both Flask and Pylons compatibility, as well as handling both Python 2 and 3. Flask support uses official Flask intercept points and no longer requires monkey-patching core functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant