summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-12 10:37:57 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-09-12 10:37:57 +0800
commit5ced3cc060a1eb16d2821b8a57faec839748944a (patch)
tree98b2c10fea4bb9f056afda41a94e9dff522cc4cc
parent23a7d3105810b858f256c14164ef44805df10d70 (diff)
downloadpttbbs-5ced3cc060a1eb16d2821b8a57faec839748944a.tar
pttbbs-5ced3cc060a1eb16d2821b8a57faec839748944a.tar.gz
pttbbs-5ced3cc060a1eb16d2821b8a57faec839748944a.tar.bz2
pttbbs-5ced3cc060a1eb16d2821b8a57faec839748944a.tar.lz
pttbbs-5ced3cc060a1eb16d2821b8a57faec839748944a.tar.xz
pttbbs-5ced3cc060a1eb16d2821b8a57faec839748944a.tar.zst
pttbbs-5ced3cc060a1eb16d2821b8a57faec839748944a.zip
* 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
-rw-r--r--daemon/regmaild/regmaild.c12
1 files 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;