From 5ced3cc060a1eb16d2821b8a57faec839748944a Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 12 Sep 2009 02:37:57 +0000 Subject: * according to PTT SYSOP posts, some people really try to register then ask adm to change for ambiguous id - allright, let's forbid them all. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4832 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- daemon/regmaild/regmaild.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/daemon/regmaild/regmaild.c b/daemon/regmaild/regmaild.c index 7028faf7..b1063484 100644 --- a/daemon/regmaild/regmaild.c +++ b/daemon/regmaild/regmaild.c @@ -279,13 +279,19 @@ end: // XXX TODO add a linear queue to handle the difference between each reload? +// XXX the reason to use case-insensitive letters (o, iL) here +// is because we really see people trying to register then +// ask SYSOP to change their id. +#define AMBLIST1 "0Oo" +#define AMBLIST2 "1IliL" + void build_unambiguous_userid(char *uid) { int i = 0; const char *ambtbl[] = { // need to also update ambchars if you touch these - "0O", // more candidates: o - "1Il", // more candidates: Li + AMBLIST1, + AMBLIST2, NULL }; @@ -302,7 +308,7 @@ build_unambiguous_userid(char *uid) } } -const char *ambchars = "0O1Il"; // super set of ambtbl +const char *ambchars = AMBLIST1 AMBLIST2; // super set of ambtbl typedef struct { char *list; -- cgit v1.2.3