[Bug 1979147] Re: folded file names in MIME headers are interpreted incorrectly by part.get_filename()
Bug Watch Updater
1979147 at bugs.launchpad.net
Mon Oct 23 14:01:49 UTC 2023
** Changed in: python
Status: Unknown => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3.10 in Ubuntu.
https://bugs.launchpad.net/bugs/1979147
Title:
folded file names in MIME headers are interpreted incorrectly by
part.get_filename()
Status in Python:
Fix Released
Status in python3.10 package in Ubuntu:
New
Bug description:
If the filename in the header field of a MIME attachment is folded,
the `get_filename()` function doesn't return the correct file name.
It's supposed to ignore folded CRLFs but doesn't.
Script which illustrates the bug:
#!/usr/bin/env python3
import email
message = email.message_from_string("""\
MIME-Version: 1.0
Content-Type: text/plain; name="This File Name Is
Folded.pdf"
Content-Disposition: attachment; filename="This File Name Is
Folded.pdf"
Content-Transfer-Encoding: 8bit
Foo
""")
print(message.get_filename())
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: libpython3.10-minimal 3.10.4-3
ProcVersionSignature: Ubuntu 5.15.0-39.42-generic 5.15.35
Uname: Linux 5.15.0-39-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sun Jun 19 15:49:23 2022
InstallationDate: Installed on 2019-01-02 (1264 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
SourcePackage: python3.10
UpgradeStatus: Upgraded to jammy on 2022-02-20 (118 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/python/+bug/1979147/+subscriptions
More information about the foundations-bugs
mailing list