Re: [PATCH] Add filename filters when saving attachments.

"Kevin J. McCarthy" <[email protected]> Mon, 18 May 2026 20:54:05 +0800
Newsgroups gmane.mail.mutt.devel
Message-ID <agsL7anZsby604RI@qinghai>
On Mon, May 18, 2026 at 01:25:38PM +0200, Vincent Lefevre wrote:
>Unprintable characters are already converted to '?' in the prompt,
>so that they will not appear in the filenames of saved attachments.
>
>Or can filenames with unprintable characters silently be created?
>In such a case, this could yield security issues, because some tools
>print such filenames directly to the terminal, thus potentially with
>harmful escape sequences.

I don't believe they can.  In a quick scan of the content-disposition 
parser, I see it filtering unprintables in the code paths.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmoLC+0ACgkQre92hIAx
a9rFiA//QoIlhLmMv2WajOvl0nd9QGWKZAjAACbq3J68lMKONUF0Gvj+ujJ+wteZ
Z+UttH8NNdSPTleOiNd/p43gCWXMN9jqPNemVwweOEHDVGYFmDFWY81Vj72wIJbD
xtBthN27NcaNIK46277BpKkq/CMD4RZmF0aF0IbeHIwG6dJCU34XWIK9fh+CQ+tB
MU5SUC+KwXuKApcUxHJRGMypZQztn9woxsvU/c5rVXYxoab6jtS5C9e6CpXAMfHa
L0UVwRegMQrVks7iMiB+ZYNaEpKCDW7TAWuFEzVrBfdrx+g2AfqyhD207yt1i7Tz
FSPD4WfEXA5sHSdVDWQUt8ap2/gN4pwqiIz6l40ClpmaZRR+09fQT1xet2Ojk6T/
7OgK0Wo9xT2ST2ZVh0XC3CooQ+o3+yi6NadYeuun5E/DvMPhOqt1yPxB3dC1c1Gk
gBmVxbuQxy4qPUvLUBId+JrnuBfxul5B79H1bLl99ZJGOJlEIozPprKgyW30gVIT
Qu67NN802Ta+tZxzEEP3XbmHbioV0M1/9Ccgs8aFGS3OPC6anVfMJfVSlP7KT9IS
15drpYl/ZVKcHU0cD4RCTTdb0xVbYt/P1HBoovpv6IH3RbxMrv5mm+yx33Y+LQ6H
4ZRAW2zrYR10orIm5NmR4Xs9N75T7S2lRFfOsjUnVIimFvlye5k=
=IVpw
-----END PGP SIGNATURE-----