From f9fa1733b080be97225efe2d7d0cf56aa1a624ac Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 18 Jun 2021 19:25:31 +0200 Subject: [PATCH] OrganizerIndex cache: ignore cookies starting with __ --- src/pretix/presale/views/organizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/presale/views/organizer.py b/src/pretix/presale/views/organizer.py index 725ecf740..e8ef4b018 100644 --- a/src/pretix/presale/views/organizer.py +++ b/src/pretix/presale/views/organizer.py @@ -333,7 +333,7 @@ class OrganizerIndex(OrganizerViewMixin, EventListMixin, ListView): for c, v in request.COOKIES.items(): # If the cookie is not one we know, it might be set by a plugin and we need to include it in the # cache key to be safe. A known example includes plugins that e.g. store cookie banner state. - if c not in (settings.SESSION_COOKIE_NAME, settings.LANGUAGE_COOKIE_NAME, settings.CSRF_COOKIE_NAME): + if c not in (settings.SESSION_COOKIE_NAME, settings.LANGUAGE_COOKIE_NAME, settings.CSRF_COOKIE_NAME) and not c.startswith('__'): cache_key_parts.append(f'{c}={v}') for c, v in request.session.items(): # If the session key is not one we know, it might be set by a plugin and we need to include it in the