Skip to content
Myr

Removed outdated section in the docs

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 c3d38a2 · Browse files · 2 files+2 added−43 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+2 added−43 removed

  • other:+2 added−43 removed

2 files+2 added−43 removed

modified:docs/api.rst-4 removed
213 unmodified lines
214215.. autoclass:: SecureCookieSessionInterface216 :members:217218.. autoclass:: UpgradeSecureCookieSessionInterface219218.. autoclass:: SecureCookieSession219 :members:220223.. autoclass:: UpgradeSecureCookieSession224221.. autoclass:: NullSession222 :members:223224.. autoclass:: SessionMixin
442 unmodified lines
modified:docs/upgrading.rst+2 added-39 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. There are two ways33to avoid these problems on upgrading:32only store a limited amount of types in the session.3335Automatically Upgrade Sessions36``````````````````````````````34TODO: add external module for session upgrading3538The first method is to allow pickle based sessions for a limited amount of39time. This can be done by using the40:class:`~flask.sessions.UpgradeSecureCookieSession` session41implementation::4243 from flask import Flask44 from flask.sessions import UpgradeSecureCookieSessionInterface4546 app = Flask(__name__)47 app.session_interface = UpgradeSecureCookieSessionInterface4849For as long as this class is being used both pickle and json sessions are50supported but changes are written in JSON format only.5152Revert to Pickle Sessions53`````````````````````````5455You can also revert to pickle based sessions if you want::5657 import pickle58 from flask import Flask59 from flask.sessions import SecureCookieSession, \60 SecureCookieSessionInterface6162 class PickleSessionInterface(SecureCookieSessionInterface):63 class session_class(SecureCookieSession):64 serialization_method = pickle6566 app = Flask(__name__)67 app.session_interface = PickleSessionInterface6869If you want to continue to use pickle based data we strongly recommend70switching to a server side session store however.717236Version 0.937-----------3839The behavior of returning tuples from a function was simplified. If you
321 unmodified lines