aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Scrubber.py
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2020-07-01 14:07:54 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2020-07-01 14:07:54 +0900
commit35d1ad5dc3acef79d1dca756c76bf2198acbbcb3 (patch)
treef8484aab620e40a549993c8eeefc02a399bd1ff5 /Mailman/Handlers/Scrubber.py
parent77ba23b721bbd94a660d44edf72f47c0e58b07ae (diff)
parented5f68f60484c62be8fc463ef433175e99f11f2f (diff)
downloadmailman2-35d1ad5dc3acef79d1dca756c76bf2198acbbcb3.tar.gz
mailman2-35d1ad5dc3acef79d1dca756c76bf2198acbbcb3.tar.xz
mailman2-35d1ad5dc3acef79d1dca756c76bf2198acbbcb3.zip
sync merge lp:mailman/2.1 up to 1859 (2.1.34 release)
Diffstat (limited to 'Mailman/Handlers/Scrubber.py')
-rw-r--r--Mailman/Handlers/Scrubber.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index 97e443b7..cecd11fb 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -471,7 +471,8 @@ def save_attachment(mlist, msg, dir, filter_html=True):
# 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