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

prevent Jinja2 from displaying csrf_token() output wrapped with b'' #59

Closed alanhamlett closed 8 years ago

alanhamlett commented 8 years ago

When using the template global function csrf_token() with Python3, the token is displayed in your template like b'abcd' when it should just be abcd. To prevent this, turn the bytes token into str.