pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
501 stars 239 forks source link

TypeError in Python 3 in calls to .sign(session.sid) #22

Closed coriolinus closed 8 years ago

coriolinus commented 9 years ago

Calls to .sign(session.sid) fail with a TypeError in Python 3; .sign requires a bytes value.

Simplest solution I see: at the top of the file, from itsdangerous import want_bytes, and replace all instances of .sign(session.sid) with .sign(want_bytes(session.sid)).