------------------------------------------------------------
revno: 1855
fixes bug: https://launchpad.net/bugs/1884456
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.1
timestamp: Sun 2020-06-21 11:45:30 -0700
message:
  Truncate very long names for scrubbed attachments.
modified:
  Mailman/Handlers/Scrubber.py
  NEWS


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Handlers/Scrubber.py'
--- Mailman/Handlers/Scrubber.py	2018-11-10 18:57:54 +0000
+++ Mailman/Handlers/Scrubber.py	2020-06-21 18:45:30 +0000
@@ -471,7 +471,8 @@
             # guessed so attachments can't lie about their type.  Also, if the
             # filename /has/ no extension, then tack on the one we guessed.
             # The extension was removed from the name above.
-            filebase = filename
+            # Allow for extra and ext and keep it under 255 bytes.
+            filebase = filename[:240]
         # Now we're looking for a unique name for this file on the file
         # system.  If msgdir/filebase.ext isn't unique, we'll add a counter
         # after filebase, e.g. msgdir/filebase-cnt.ext

=== modified file 'NEWS'
--- NEWS	2020-06-10 22:04:26 +0000
+++ NEWS	2020-06-21 18:45:30 +0000
@@ -24,6 +24,9 @@
       mailbombing of a member of a list with private rosters by repeated
       subscribe attempts.  (LP: #1883017)
 
+    - Very long filenames for scrubbed attachments are now truncated.
+      (LP: #1884456)
+
 2.1.33 (07-May-2020)
 
   Security

_______________________________________________
Mailman-checkins mailing list -- mailman-checkins@python.org
To unsubscribe send an email to mailman-checkins-le...@python.org
https://mail.python.org/mailman3/lists/mailman-checkins.python.org/
Member address: arch...@jab.org

Reply via email to