Re: [PATCH] Change attachment stamping to use stat st_mtime by default.
"Kevin J. McCarthy" <[email protected]>
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 21, 2026 at 03:12:01PM +0200, Vincent Lefevre wrote: >On 2026-08-21 11:00:58 -0000, Crystal Kolipe via Mutt-dev wrote: >> On Fri, Aug 21, 2026 at 10:09:27AM +0200, Vincent Lefevre wrote: >> > (actually, we want to know whether the file contents have changed). >> >> Then the correct and portable way to do it is to check file size, >> and if that has not changed then check the actual contents. > >True. This is what *must* be done. Comparing the contents should be >based on a cryptographic hash because the old contents are no longer >available. > >The current Mutt behavior is buggy (on any platform): replacing >an attachment (e.g. with "mv") by an one that isn't more recent >is undetected by Mutt, while the goal of the test is to detect >a replacement to ensure that the encoding is correct. I'm not strongly opposed to doing a hash. But I think the original intent was to protect the user against accidental trip-ups, not to provide a fool-proof measure. The user can just as easily override encoding and types if they want to send something incorrect. -- 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----- iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmqIVigACgkQre92hIAx a9pUew/7BWKp9zNs7EWg+Hjxa6qS6zNLUEOkmpoTgYqeN35BvAjnc42PbaHUUSyL bVj39d2I71RwfwZ/u/WVlmw6pQXgC8ncu66Wz2WNXwydS7D3PIruU1tRIVaVqMzT JBPmL7/2x0Oza6EjRQtOFIlq/YjrwSdl8i1t20v4pofSdjXH9a57Tg5ZIifo7zqP bZtBXYuwburktuqKexxiDzW5Oa9UBkAflw91MegSw3p0CtN9JkBQ5279mSiF42XD 5+FzcTm3DRae9NKNCZDuLR1tjRovu6UxBY5paAw3tdE9I1p1G8ys3B5vonXJkETT bcKvoxw24h3lz1fu7CywlaMfhKo/uckxAnhMzAZ7rS1TfPfYye2RWBNpamdhKBTV 8V//VMHzO4yMaw0YXsKWQiFOHRF8Ntvp3PVW+VUsEUhFtgPNHqIFnUNPvZr9Dk6k nco6ZivAf6hKYp4d6AyG5MGYn0CB+ODgDc2FkQl1bm7WoU4heG2Tu/kIl615zyEk 6JBfjLw1RC4V7PbVhGT2aJoJEKlwyTVmeQjW6UfszyqqC+kWKr6299U4HxP0ZEgn DgZV1ZGCOzUreSLDMaxKgZTWvkPJ7Wuo/AJWOsslFk7yg5Eqc3PSg9HY4MjnZ+ap 5l7wU8973amKzaQJQra8+O/Ghkrx5gLj3OB56LBPmR8ixHJR4b4= =gETr -----END PGP SIGNATURE-----