On Sun, Apr 19, 2020 at 01:03:06AM +0200, Oswald Buddenhagen wrote: > On Sat, Apr 18, 2020 at 01:23:50PM -0500, Derek Martin wrote: > > On Sat, Apr 18, 2020 at 01:57:50PM -0400, Remco Rijnders wrote: > > > On Sat, Apr 18, 2020 at 12:26:34PM -0500, Derek wrote in > > > > In other words, this scheme does not guarantee uniqueness, and is > > > > therefore broken. > > > > > > Well, the odds of the same number being selected are about 1 in 2 billion > > > (on modern day Linux, admittedly), while the odds of winning the jackpot > > > in > > > the Powerball lottery are about 1 in 292 million. > > > > If your RNG is working properly. > > > you have much bigger issues (with mutt alone) if it isn't.
Maybe... if for example you're reading your mail on a remote server over an encrypted session (IMAP, etc.). I don't. Otherwise, off the top of my head I think the biggest concern would be generating temporary file names, but we could eliminate that as a concern also by having mutt create a temporary directory to put the files in, and lock it down to 700, prior to creating the files (in fact I think I've suggested just that in the past). An even better solution to that problem is for the user to set TMPDIR to a local-disk directory they've already created, that has restrictive permissions, and then there would be no possibility of a collision when creating temporary directories/files. (I do this.) After that, I don't think Mutt uses random numbers for anything sensitive, that I can remember. But obviously I'd have to review the code. > anyway, an alternative to randomizing would be sha1'ing everything except > the timestamp - the probability of a clash is just beyond the pale. in fact, > i think i've seen message ids that do just that, as they looked like > <small_number.really_big_number>. I think this is a reasonable suggestion. I still don't think it's worth the effort. > on a tangent, mutt's thread linking features do not work if the message-ids > lack the <angle brackets>. i presume these might be invalid, but they are > rather common nonetheless. someone feels like having a look? You should probably open a bug about it... -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience.
signature.asc
Description: PGP signature