Skip to content
Myr

Updated documentation for the new sessions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent e1a5761 · Browse files · 2 files+9 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−5 removed

  • other:+9 added−5 removed

2 files+9 added−5 removed

modified:docs/upgrading.rst+7 added-2 removed
27 unmodified lines
28format changed from pickle to a specialized JSON format. This change has29been done in order to avoid the damage an attacker can do if the secret30key is leaked. When you upgrade you will notice two major changes: all31sessions that were issued before the upgrade are invalidated and you can32only store a limited amount of types in the session.32only store a limited amount of types in the session. The new sessions are33by design much more restricted to only allow JSON with a few small34extensions for tuples and strings with HTML markup.3534TODO: add external module for session upgrading36In order to not break people's sessions it is possible to continue using37the old session system by using the `Flask-OldSessions_` extension.3839.. _Flask-OldSessions: http://packages.python.org/Flask-OldSessions/4041Version 0.942-----------4344The behavior of returning tuples from a function was simplified. If you
321 unmodified lines
modified:flask/sessions.py+2 added-3 removed
1 unmodified line
2"""3 flask.sessions4 ~~~~~~~~~~~~~~56 Implements cookie based sessions based on Werkzeug's secure cookie7 system.6 Implements cookie based sessions based on itsdangerous.79 :copyright: (c) 2011 by Armin Ronacher.8 :copyright: (c) 2012 by Armin Ronacher.9 :license: BSD, see LICENSE for more details.10"""1112import hashlib
279 unmodified lines