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

Fixed referer checking. #14

Closed jpvanhal closed 12 years ago

jpvanhal commented 12 years ago

SeaSurf tried to read HTTP referer information from "HTTP_REFERER" header, whereas in Flask the header is called just "Referer".

I also added a couple of tests for testing good and bad referers, and fixed a bug in _same_origin() introduced during the PEP8 error cleanup.

maxcountryman commented 12 years ago

Love this! Thank you.