You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2026/05/26 20:56:36 UTC
(allura) 20/33: [#8607] remove old pickle-based session support
This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch db/8607
in repository https://gitbox.apache.org/repos/asf/allura.git
commit b4264a414cc598cd8b737fe789396e8ba837aabb
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Tue May 19 12:43:14 2026 -0400
[#8607] remove old pickle-based session support
---
Allura/allura/config/middleware.py | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index d1cd4cdff..7a6cd0683 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -20,7 +20,6 @@
import ast
import importlib
import mimetypes
-import pickle
import re
import warnings
@@ -28,7 +27,6 @@
from paste.deploy.converters import asbool, aslist, asint
from tg.support.registry import RegistryManager
from beaker.middleware import SessionMiddleware
-from beaker.util import PickleSerializer
from paste.exceptions.errormiddleware import ErrorMiddleware
from werkzeug.debug import DebuggedApplication
@@ -84,12 +82,6 @@ def make_app(global_conf: dict, **app_conf):
return _make_core_app(root, global_conf, **app_conf)
-class BeakerPickleSerializerWithLatin1(PickleSerializer):
- def loads(self, data_string):
- # need latin1 to decode py2 timestamps in py https://docs.python.org/3/library/pickle.html#pickle.Unpickler
- return pickle.loads(data_string, encoding='latin1') # noqa: S301
-
-
def _make_core_app(root, global_conf: dict, **app_conf):
"""
Set allura up with the settings found in the PasteDeploy configuration
@@ -142,7 +134,6 @@ def _make_core_app(root, global_conf: dict, **app_conf):
re.escape('Session options should start with session. instead of session_.'),
DeprecationWarning)
app = SessionMiddleware(app, config,
- original_format_data_serializer=BeakerPickleSerializerWithLatin1(),
session_class=JWTCookieSession)
# Handle "Remember me" functionality
app = RememberLoginMiddleware(app, config)