[Mailman-Developers] [Mailman-checkins] [Branch ~mailman-coders/mailman/3.0]
Barry Warsaw
barry at list.org
Sun Nov 18 19:00:48 CET 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Nov 6, 2007, at 9:07 PM, noreply at launchpad.net wrote:
> ------------------------------------------------------------
> revno: 6573
> committer: Mark Sapiro <msapiro at value.net>
> branch nick: 3.0
> timestamp: Tue 2007-11-06 18:03:28 -0800
> message:
> - Scrubber.py
> Fixed an issue where an implicit text/plain part without any
> headers gets
> lost.
>
> Moved the cleansing of the filename extension to a place where
> it is
> guaranteed to be a string as opposed to an empty list.
> modified:
> Mailman/Handlers/Scrubber.py
>
> === modified file 'Mailman/Handlers/Scrubber.py'
> --- a/Mailman/Handlers/Scrubber.py 2007-10-31 21:38:51 +0000
> +++ b/Mailman/Handlers/Scrubber.py 2007-11-07 02:03:28 +0000
> @@ -46,7 +46,7 @@
> # Path characters for common platforms
> pre = re.compile(r'[/\\:]')
> # All other characters to strip out of Content-Disposition: filenames
> -# (essentially anything that isn't an alphanum, dot, slash, or
> underscore.
> +# (essentially anything that isn't an alphanum, dot, dash, or
> underscore).
> sre = re.compile(r'[^-\w.]')
> # Regexp to strip out leading dots
> dre = re.compile(r'^\.*')
> @@ -265,7 +265,7 @@
> # If the message isn't a multipart, then we'll strip it
> out as an
> # attachment that would have to be separately downloaded.
> Pipermail
> # will transform the url into a hyperlink.
> - elif part and not part.is_multipart():
> + elif part._payload and not part.is_multipart():
I'm not sure it's a good idea to use this non-public attribute.
'part.get_payload()' would probably be a better test.
- -Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iD8DBQFHQH3Q2YZpQepbvXERAh5kAJ9vkjyCoAV10aYaNEDE34i9KNKQxgCgjF3p
c7yN8r7OSuvkTjVUXa75zKA=
=V12k
-----END PGP SIGNATURE-----
More information about the Mailman-Developers
mailing list