Compare commits

...

4 Commits

Author SHA1 Message Date
Raphael Michel
b77eec6d64 Bump to 2026.2.2 2026-05-27 16:30:01 +02:00
Raphael Michel
db52099404 [SECURITY] Add missing session check for cached files (CVE-2026-9712) 2026-05-27 16:29:54 +02:00
Raphael Michel
31d84415b5 Bump version to 2026.2.1 2026-04-08 13:59:57 +02:00
Raphael Michel
fca335020a [SECURITY] API: Add missing event filter for check-ins 2026-04-08 13:59:42 +02:00
3 changed files with 8 additions and 2 deletions

View File

@@ -19,4 +19,4 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
__version__ = "2026.2.0"
__version__ = "2026.2.2"

View File

@@ -1121,7 +1121,7 @@ class CheckinViewSet(viewsets.ReadOnlyModelViewSet):
permission = 'can_view_orders'
def get_queryset(self):
qs = Checkin.all.filter().select_related(
qs = Checkin.all.filter(list__event=self.request.event).select_related(
"position",
"device",
)

View File

@@ -229,6 +229,11 @@ class TicketRendererViewSet(viewsets.ViewSet):
@action(detail=False, methods=['GET'], url_name='download', url_path='download/(?P<asyncid>[^/]+)/(?P<cfid>[^/]+)')
def download(self, *args, **kwargs):
cf = get_object_or_404(CachedFile, id=kwargs['cfid'])
if not cf.allowed_for_session(self.request, "ticketoutputpdf-api"):
return Response(
{'status': 'failed', 'message': 'Unknown file ID or export failed'},
status=status.HTTP_410_GONE
)
if cf.file:
resp = ChunkBasedFileResponse(cf.file.file, content_type=cf.type)
resp['Content-Disposition'] = 'attachment; filename="{}"'.format(cf.filename).encode("ascii", "ignore")
@@ -265,6 +270,7 @@ class TicketRendererViewSet(viewsets.ViewSet):
serializer.is_valid(raise_exception=True)
cf = CachedFile(web_download=False)
cf.bind_to_session(self.request, "ticketoutputpdf-api")
cf.date = now()
cf.expires = now() + timedelta(hours=24)
cf.save()