The registration process has a race condition. Today the .htpasswd file of twiki.org got cut in half, stopping at K entries. We had two registrations at exactly the same time (names obfuscated) :
| 10 Dec 2008 - 10:29 | MattOne | register | Main.MattOne | matt@example.com | 1.2.3.4 |
| 10 Dec 2008 - 10:29 | MartinTwo | register | Main.MartinTwo | martin@example.com | 5.6.7.8 |
We need to add locking to the .htpasswd file update to prevent this (very rare) race condition.
(Fortunately I did a backup just 30 min earlier, so nothing was lost except for one user's passwd entry.)
--
TWiki:Main/PeterThoeny
- 10 Dec 2008
FWIW, this was evident by inspection when I wrote
X509Plugin.
It does the necessary locking, so you can take the code from there. (However, note that X509 stores a bit more in the file than the standared authentication code does.)
--
TWiki:Main.TimotheLitt
- 11 Jan 2009