Flask-Middleware / flask-security

Quick and simple security for Flask applications
MIT License
624 stars 155 forks source link

Fix 2 CSRF issues. #928

Closed jwag956 closed 4 months ago

jwag956 commented 4 months ago

1) If CSRF_COOKIE_NAME wasn't set, then our CSRF_HEADER wasn't added to the list in WTforms and therefore didn't work. 2) If you set CSRF_PROTECT_MECHANISMS to an empty list (to hopefully disable CSRF) - it in fact didn't stop CSRF...

closes #870

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (263b2c2) 98.44% compared to head (f775f32) 98.44%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #928 +/- ## ======================================= Coverage 98.44% 98.44% ======================================= Files 35 35 Lines 4510 4513 +3 ======================================= + Hits 4440 4443 +3 Misses 70 70 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.