summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-05-23 09:27:40 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-05-23 09:27:40 +0800
commit89456a6324f6b596e93879d4decf5a6110688632 (patch)
tree8b87d7ea69f060ab1a62f522d059d67d93a5fba1
parent98e34e734e91e8d1c982aa0674faf9f7bcb4e991 (diff)
downloadpttbbs-89456a6324f6b596e93879d4decf5a6110688632.tar
pttbbs-89456a6324f6b596e93879d4decf5a6110688632.tar.gz
pttbbs-89456a6324f6b596e93879d4decf5a6110688632.tar.bz2
pttbbs-89456a6324f6b596e93879d4decf5a6110688632.tar.lz
pttbbs-89456a6324f6b596e93879d4decf5a6110688632.tar.xz
pttbbs-89456a6324f6b596e93879d4decf5a6110688632.tar.zst
pttbbs-89456a6324f6b596e93879d4decf5a6110688632.zip
- add reserved id to prevent malicious registration
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4461 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/common.h1
-rw-r--r--mbbsd/register.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index c842a330..655c06b9 100644
--- a/include/common.h
+++ b/include/common.h
@@ -33,6 +33,7 @@
#define FN_TICKET_BRDLIST "boardlist"
#define FN_BRDLISTHELP "etc/boardlist.help"
#define FN_BOARDHELP "etc/board.help"
+#define FN_RESERVED_ID "etc/reserved.id" // 保留系統用無法註冊的 ID
#define FN_USERMEMO "memo.txt" // 使用者個人記事本
diff --git a/mbbsd/register.c b/mbbsd/register.c
index b26107c0..c5bda783 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -124,6 +124,9 @@ bad_user_id(const char *userid)
return 1;
#endif
+ if (file_exist_record(FN_RESERVED_ID, userid))
+ return 1;
+
/* in2: 原本是用strcasestr,
不過有些人中間剛剛好出現這個字應該還算合理吧? */
if( strncasecmp(userid, "fuck", 4) == 0 ||