Skip to content

Add CSRFProtect to flask #2488

New issue

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

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

Already on GitHub? # to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add CSRFProtect to flask #2488

wants to merge 1 commit into from

Conversation

nvoxland
Copy link
Contributor

🚀 🚀 Pull Request

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

By default, Flask does not protect form a cross-site request forgery attack. This PR adds the CSRFProtect module as suggested by https://sonarcloud.io/organizations/activeloopai/rules?open=python%3AS4502&rule_key=python%3AS4502

Things to be aware of

Is our usage of Flask worth adding this in for? We could just mark it as not a problem in sonar. At the same time, I don't think it adds much overhead, so seems fine to add to be safe?

Things to worry about

Will adding this break existing ways we use the flask server?

@nvoxland nvoxland requested a review from khustup July 17, 2023 18:54
@tatevikh tatevikh requested a review from levongh July 20, 2023 18:31
@tatevikh tatevikh requested a review from xiaohanhuang July 25, 2023 16:37
@nvoxland nvoxland marked this pull request as draft July 25, 2023 20:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants