diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-04-06 13:17:56 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-04-06 13:17:56 +0800 |
commit | a47589bd836f92de73811c3049d786cfcd2bd850 (patch) | |
tree | 8e7d348c4d773f7d11a5f17f673fea21bfe82bc5 /mbbsd | |
parent | f9d8df377c9725ba53e805379738aaf8dff1b25d (diff) | |
download | pttbbs-a47589bd836f92de73811c3049d786cfcd2bd850.tar pttbbs-a47589bd836f92de73811c3049d786cfcd2bd850.tar.gz pttbbs-a47589bd836f92de73811c3049d786cfcd2bd850.tar.bz2 pttbbs-a47589bd836f92de73811c3049d786cfcd2bd850.tar.lz pttbbs-a47589bd836f92de73811c3049d786cfcd2bd850.tar.xz pttbbs-a47589bd836f92de73811c3049d786cfcd2bd850.tar.zst pttbbs-a47589bd836f92de73811c3049d786cfcd2bd850.zip |
fix the email security hole
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3498 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/user.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c index 32b33f80..c8a6e0ca 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -684,8 +684,11 @@ uinfo_query(userec_t *u, int adminmode, int unum) snprintf(buf, sizeof(buf), "%010d", x.mobile); getdata_buf(i++, 0, "手機號碼:", buf, 11, LCECHO); x.mobile = atoi(buf); - getdata_str(i++, 0, "電子信箱[變動要重新認證]:", buf, 50, DOECHO, + do + { + getdata_str(i++, 0, "電子信箱[變動要重新認證]:", buf, 50, DOECHO, x.email); + }while(!isvalidemail(buf)); if (strcmp(buf, x.email) && strchr(buf, '@')) { strlcpy(x.email, buf, sizeof(x.email)); mail_changed = 1 - adminmode; @@ -1351,7 +1354,7 @@ removespace(char *s) -static int +int isvalidemail(const char *email) { FILE *fp; |