Add __Host- prefix to CSRF and session cookie, remove cookie_domain (#3831)

* Add __Host- prefix to CSRF and session cookie, remove cookie_domain

* Fix tests
This commit is contained in:
Raphael Michel
2024-01-25 09:45:56 +01:00
committed by GitHub
parent dba8e80868
commit 6af2d38a98
6 changed files with 59 additions and 42 deletions

View File

@@ -54,7 +54,6 @@ from pretix.base.models import (
from pretix.base.services.cart import get_fees
from pretix.base.templatetags.money import money_filter
from pretix.helpers.cookies import set_cookie_without_samesite
from pretix.multidomain.middlewares import get_cookie_domain
from pretix.multidomain.urlreverse import eventreverse
from pretix.presale.signals import question_form_fields
@@ -469,7 +468,6 @@ def iframe_entry_view_wrapper(view_func):
locale,
max_age=max_age,
expires=(datetime.utcnow() + timedelta(seconds=max_age)).strftime('%a, %d-%b-%Y %H:%M:%S GMT'),
domain=get_cookie_domain(request)
)
return resp