mailman/CVE-2020-12137.patch
programmer12 e50f0eeb83 fix CVES
(cherry picked from commit aa7a1256e2a38decd24fa171a8cf06026d8d7f8f)
2021-10-19 15:40:56 +08:00

27 lines
739 B
Diff

From ce32b3a6223efac121fc0df59e5316cfb6b8d3a0 Mon Sep 17 00:00:00 2001
From: Mark Sapiro <mark@debian.org>
Date: Tue, 19 Oct 2021 11:14:11 +0800
Subject: [PATCH] 2
---
Mailman/Handlers/Scrubber.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index 429312b..08ae55a 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -87,6 +87,9 @@ def guess_extension(ctype, ext):
all = guess_all_extensions(ctype, strict=False)
if ext in all:
return ext
+ if ctype.lower == 'application/octet-stream':
+ # For this type,all[0] is '.obj'.'.bin' is better.
+ return '.bin'
return all and all[0]
--
2.27.0