Version in base suite: 1.3.5-2 Base version: django-mailman3_1.3.5-2 Target version: django-mailman3_1.3.5-2+deb11u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/d/django-mailman3/django-mailman3_1.3.5-2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/d/django-mailman3/django-mailman3_1.3.5-2+deb11u1.dsc changelog | 7 + patches/0001-Scrubber-now-removes-null-bytes-from-the-scrubbed-me.patch | 43 ++++++++++ patches/series | 1 3 files changed, 51 insertions(+) diff -Nru django-mailman3-1.3.5/debian/changelog django-mailman3-1.3.5/debian/changelog --- django-mailman3-1.3.5/debian/changelog 2021-03-03 23:23:46.000000000 +0000 +++ django-mailman3-1.3.5/debian/changelog 2024-01-08 21:32:29.000000000 +0000 @@ -1,3 +1,10 @@ +django-mailman3 (1.3.5-2+deb11u1) bullseye; urgency=medium + + * d/p/0001: Fix archiving issues due to nullbytes in message body + (Closes: #1033256) + + -- Pierre-Elliott Bécue Mon, 08 Jan 2024 22:32:29 +0100 + django-mailman3 (1.3.5-2) unstable; urgency=medium * Compile django LC messages at build time diff -Nru django-mailman3-1.3.5/debian/patches/0001-Scrubber-now-removes-null-bytes-from-the-scrubbed-me.patch django-mailman3-1.3.5/debian/patches/0001-Scrubber-now-removes-null-bytes-from-the-scrubbed-me.patch --- django-mailman3-1.3.5/debian/patches/0001-Scrubber-now-removes-null-bytes-from-the-scrubbed-me.patch 1970-01-01 00:00:00.000000000 +0000 +++ django-mailman3-1.3.5/debian/patches/0001-Scrubber-now-removes-null-bytes-from-the-scrubbed-me.patch 2024-01-08 21:32:29.000000000 +0000 @@ -0,0 +1,43 @@ +From: =?utf-8?q?Pierre-Elliott_B=C3=A9cue?= +Date: Mon, 8 Jan 2024 22:40:38 +0100 +Subject: Scrubber now removes null bytes from the scrubbed message body. + +--- + README.rst | 1 + + django_mailman3/lib/scrub.py | 5 ++++- + 3 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/README.rst b/README.rst +index 775b158..98264be 100644 +--- a/README.rst ++++ b/README.rst +@@ -17,6 +17,7 @@ NEWS + * Add a new method get_django_user to return Django User model. (See !99) + * Add ``delete_archives`` field to ``mailinglist_deleted`` Signal. + * Replaced deprecated ``ugettexy_lazy`` with ``gettext_lazy``. (Closes #37) ++* Scrubber now removes null bytes from the scrubbed message body. + + + 1.3.4 (2020-06-05) +diff --git a/django_mailman3/lib/scrub.py b/django_mailman3/lib/scrub.py +index f35761b..2be66c9 100644 +--- a/django_mailman3/lib/scrub.py ++++ b/django_mailman3/lib/scrub.py +@@ -248,6 +248,8 @@ class Scrubber(): + next_part_match = NEXT_PART.search(result) + if next_part_match: + result = result[0:next_part_match.start(0)] ++ # MAS Remove any null butes from the result. ++ result = re.sub('\x00', '', result) + return result + + def _get_text(self): +@@ -276,6 +278,7 @@ class Scrubber(): + if not part_content.endswith('\n'): + part_content += '\n' + text.append(part_content) +- return '\n'.join(text) ++ # MAS remove any null bytes from the text. ++ return re.sub('\x00', '', '\n'.join(text)) + else: + return self._get_text_one_part(self.msg) diff -Nru django-mailman3-1.3.5/debian/patches/series django-mailman3-1.3.5/debian/patches/series --- django-mailman3-1.3.5/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ django-mailman3-1.3.5/debian/patches/series 2024-01-08 21:32:29.000000000 +0000 @@ -0,0 +1 @@ +0001-Scrubber-now-removes-null-bytes-from-the-scrubbed-me.patch