flask-session icon indicating copy to clipboard operation
flask-session copied to clipboard

Session fails because of no secret_key

Open cereal2nd opened this issue 8 years ago • 1 comments

When no secret key is set the get_signer returns None but this is not catched.

2017-02-16 19:17:08,522 domogik.admin.application ERROR Request finalizing failed with an error while handling an error Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1632, in finalize_request response = self.process_response(response) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1858, in process_response self.save_session(ctx.session, response) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 924, in save_session return self.session_interface.save_session(self, session, response) File "/usr/local/lib/python2.7/dist-packages/Flask_Session-0.3.0-py2.7.egg/flask_session/sessions.py", line 357, in save_session session_id = self._get_signer(app).sign(want_bytes(session.sid)) AttributeError: 'NoneType' object has no attribute 'sign'

cereal2nd avatar Mar 22 '17 04:03 cereal2nd

As far as I can see, the session would be one null session and won't be saved, what is your Flask version?

fengsp avatar Apr 05 '17 03:04 fengsp

Null session causing misleading error. Will be fixed from 0.7.0

Lxstr avatar Feb 25 '24 13:02 Lxstr