maxcountryman / flask-seasurf

SeaSurf is a Flask extension for preventing cross-site request forgery (CSRF).
http://readthedocs.org/docs/flask-seasurf/
Other
190 stars 49 forks source link

Fix getCookie implementation in test classes #88

Closed bjudson closed 5 years ago

bjudson commented 5 years ago

getCookie method included with many of the test suite classes pulls the first item from the dict returned by parse_cookie(). In versions of Python where the dict is not ordered (<=3.5), this may return the session cookie rather than the CSRF token cookie, causing tests to fail. This change to getCookie ensures that the tests don't rely on parse_cookie returned an ordered dict.

Addresses https://github.com/maxcountryman/flask-seasurf/issues/86

maxcountryman commented 5 years ago

Nice!