diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-10 13:21:01 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-10 13:21:01 +0800 |
commit | 581d8f19dc4a8dd4321cfa2cf940c3ecaf52f3c8 (patch) | |
tree | f59dd235675535969b55790ddfc668f015fb67c3 /mbbsd | |
parent | 9bc937664cf3876c082742ff7d26fd99d4e201d6 (diff) | |
download | pttbbs-581d8f19dc4a8dd4321cfa2cf940c3ecaf52f3c8.tar pttbbs-581d8f19dc4a8dd4321cfa2cf940c3ecaf52f3c8.tar.gz pttbbs-581d8f19dc4a8dd4321cfa2cf940c3ecaf52f3c8.tar.bz2 pttbbs-581d8f19dc4a8dd4321cfa2cf940c3ecaf52f3c8.tar.lz pttbbs-581d8f19dc4a8dd4321cfa2cf940c3ecaf52f3c8.tar.xz pttbbs-581d8f19dc4a8dd4321cfa2cf940c3ecaf52f3c8.tar.zst pttbbs-581d8f19dc4a8dd4321cfa2cf940c3ecaf52f3c8.zip |
- (exp captcha) random seed should be initialized earlier for captcha.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4286 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/mbbsd.c | 5 | ||||
-rw-r--r-- | mbbsd/register.c | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 887ca77e..0958988d 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1139,9 +1139,6 @@ user_login(void) /* get local time */ localtime4_r(&now, &ptime); - /* 初始化: random number 增加user跟時間的差異 */ - mysrand(); - log_usies("ENTER", fromhost); #ifndef VALGRIND setproctitle("%s: %s", margs, cuser.userid); @@ -1385,6 +1382,8 @@ start_client(void) Signal(SIGALRM, abort_bbs); alarm(600); + mysrand(); /* 初始化: random number 增加user跟時間的差異 */ + login_query(); /* Ptt 加上login time out */ m_init(); /* init the user mail path */ user_login(); diff --git a/mbbsd/register.c b/mbbsd/register.c index b3ba087f..6117b47e 100644 --- a/mbbsd/register.c +++ b/mbbsd/register.c @@ -374,7 +374,7 @@ delregcodefile(void) //////////////////////////////////////////////////////////////////////////// // Figlet Captcha System //////////////////////////////////////////////////////////////////////////// -#ifdef USE_FIGLET_CAPCTHA +#ifdef USE_FIGLET_CAPTCHA int gen_captcha(char *buf, int szbuf, char *fpath) @@ -509,7 +509,7 @@ int verify_captcha() clear(); return 1; } -#else // NO CAPTCHA +#else // !USE_FIGLET_CAPTCHA int verify_captcha() @@ -517,7 +517,7 @@ verify_captcha() return 1; } -#endif +#endif // !USE_FIGLET_CAPTCHA //////////////////////////////////////////////////////////////////////////// // Justify Utilities |