Subject: Developers of Sympa
List archive
- From: Olivier Salaun - CRU <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-dev] two messages - one key
- Date: Mon, 15 May 2000 09:52:09 +0200
Hervé Maza wrote :
> When sympa parses 2 messages in the same second for the same moderated
> list, the 2 messages receive the same key for moderation. The editor
> receives the two messages, but is unable to moderate all of them, since
> only one remains in spool/mod.
This bug has been reported to us a month ago.
> It's a low probability, but this incident
> already occured (twice) in a list. The reason on that is the clause
> "srand(time)" in List::send_to_editor. Due to the precision of time
> function, srand(time) forces rand function to produce same sequence if
> several messages are parsed in less than 1 second.
> To avoid this problem, I plan to simply remove srand(time) instruction.
> Does this change make the mod key really predictable ?
No as far as the cookie is used, it's not predictable.
We solved the problem with a sleep(1) before processing the key.
But we plan to adopt a proper solution such as :
MD5 ( messageID or a MD5(msg)
+ listname
+ list/site's cookie
)
This prevents from generating the same key for 2 messages.
Olivier Salaün
Comite Reseaux des universites
-
[sympa-dev] two messages - one key,
Hervé Maza, 05/12/2000
- Re: [sympa-dev] two messages - one key, Olivier Salaun - CRU, 05/15/2000
Archive powered by MHonArc 2.6.19+.