diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-05-23 09:27:40 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-05-23 09:27:40 +0800 |
commit | 89456a6324f6b596e93879d4decf5a6110688632 (patch) | |
tree | 8b87d7ea69f060ab1a62f522d059d67d93a5fba1 | |
parent | 98e34e734e91e8d1c982aa0674faf9f7bcb4e991 (diff) | |
download | pttbbs-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.h | 1 | ||||
-rw-r--r-- | mbbsd/register.c | 3 |
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" // �O�d�t�ΥεL�k���U�� ID #define FN_USERMEMO "memo.txt" // �ϥΪ̭ӤH�O�ƥ� 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: �쥻�O��strcasestr, ���L���ǤH�������n�X�{�o�Ӧr�����ٺ�X�z�a? */ if( strncasecmp(userid, "fuck", 4) == 0 || |