On 2026-05-04 15:29:15 +0800, Kevin J. McCarthy wrote:
> Elsewhere in the mutt_save_attachment_list() flow, care is taken to
> use the basename, but not in the most basic case.
> 
> It almost seems deliberate, but if so I think it's a poor choice.
> Always use the basename.  Don't allow a distracted user to
> accidentally save random files elsewhere in their filesystem.

BTW, in the mail I received, the slashes were actually part of a date
as often written in French: "03/05/2026". I'm wondering whether the
RFCs give a special meaning to the slashes for the filename value
(such as a directory separator, which should be ignored), i.e. whether
this is an error from the sender (who used slashes in an incorrect
manner) or slashes should rather be replaced by another character
on the MUA side. Some non-POSIX systems use another character as a
directory separator (e.g. "\" on MS-DOS/Windows, "." on RISC OS),
so that the filename in question from the mail could be regarded as
being a fully valid filename on such systems if the RFCs do not say
anything special. So, here (as on other systems where the directory
separator is "/"), replacing the "/" by another character could be
an alternative solution in order to keep more information from the
mail.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)

Reply via email to