1
0

Accepting request 1188491 from devel:languages:python:mailman

OBS-URL: https://build.opensuse.org/request/show/1188491
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-HyperKitty?expand=0&rev=29
This commit is contained in:
2024-07-19 13:29:01 +00:00
committed by Git OBS Bridge
3 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
From eb67c2fc470b88385f63435a826d73b32fc3c226 Mon Sep 17 00:00:00 2001
From: Mark Sapiro <mark@msapiro.net>
Date: Mon, 15 Jul 2024 17:44:59 -0700
Subject: [PATCH] Return null bytes for empty attachment get_content.
---
hyperkitty/models/email.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hyperkitty/models/email.py b/hyperkitty/models/email.py
index 651694e5..12732a93 100644
--- a/hyperkitty/models/email.py
+++ b/hyperkitty/models/email.py
@@ -329,12 +329,12 @@ class Attachment(models.Model):
if self.content is not None:
return bytes(self.content)
if folder is None:
- return ""
+ return b''
filepath = os.path.join(folder, str(self.counter))
if not os.path.exists(filepath):
logger.error("Could not find local attachment %s for email %s",
self.counter, self.email.id)
- return ""
+ return b''
with open(filepath, "rb") as f:
content = f.read()
return content
--
GitLab

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 18 20:22:39 UTC 2024 - Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
- Add gl-mr635-empty_attachment.patch to resolve corrupted archive
downloads on mails with empty attachments
-------------------------------------------------------------------
Sun Jun 23 08:37:43 UTC 2024 - Andreas Schneider <asn@cryptomilk.org>

View File

@@ -94,6 +94,8 @@ Patch0: hyperkitty-settings.patch
Patch98: gl-mr300-add-opengraph-metadata.patch
# PATCH-FIX-UPSTREAM gl-mr470-introduce-feed-filtering.patch gl#mailman/hyperkitty#470
Patch99: gl-mr470-introduce-feed-filtering.patch
# PATCH-FIX-UPSTREAM gl-mr635-empty_attachment.patch gl#mailman/hyperkitty#635
Patch100: gl-mr635-empty_attachment.patch
#
BuildRequires: %{python_module Django >= %{django_min_version} with %python-Django < %{django_max_version}}
BuildRequires: %{python_module Whoosh}