mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
[SECURITY] Bind relevant cached file downloads to the current session
This commit is contained in:
@@ -235,7 +235,7 @@ class OrderPrintDo(EventPermissionRequiredMixin, AsyncAction, View):
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
order = get_object_or_404(self.request.event.orders, code=request.GET.get("code"))
|
||||
cf = CachedFile()
|
||||
cf = CachedFile(web_download=True, session_key=self.request.session.session_key)
|
||||
cf.date = now()
|
||||
cf.type = 'application/pdf'
|
||||
cf.expires = now() + timedelta(days=3)
|
||||
|
||||
Reference in New Issue
Block a user