diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-27 02:40:41 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-27 02:40:41 +0800 |
commit | 028ae0c1848aae10faab7783164abbd2ddc8a8d7 (patch) | |
tree | 21ec7514aa92372669bdb3975f8477099743241c | |
parent | 2e9ffdbbc5ab67505152ef009c4b1cec57a00e73 (diff) | |
download | pttbbs-028ae0c1848aae10faab7783164abbd2ddc8a8d7.tar pttbbs-028ae0c1848aae10faab7783164abbd2ddc8a8d7.tar.gz pttbbs-028ae0c1848aae10faab7783164abbd2ddc8a8d7.tar.bz2 pttbbs-028ae0c1848aae10faab7783164abbd2ddc8a8d7.tar.lz pttbbs-028ae0c1848aae10faab7783164abbd2ddc8a8d7.tar.xz pttbbs-028ae0c1848aae10faab7783164abbd2ddc8a8d7.tar.zst pttbbs-028ae0c1848aae10faab7783164abbd2ddc8a8d7.zip |
many users leave blanks in mail addr.
let's help them.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2965 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/mail.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index c6dcf28e..ad6fa9df 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -182,6 +182,7 @@ m_internet(void) char receiver[60]; getdata(20, 0, "收信人:", receiver, sizeof(receiver), DOECHO); + trim(receiver); if (strchr(receiver, '@') && !invalidaddr(receiver) && getdata(21, 0, "主 題:", save_title, STRLEN, DOECHO)) do_send(receiver, save_title); @@ -1394,6 +1395,7 @@ mail_waterball(int ent, fileheader_t * fhdr, const char *direct) return 1; } } + trim(address); if (invalidaddr(address)) return -2; if( strstr(address, ".bbs") && REJECT_OUTTAMAIL ){ @@ -1711,6 +1713,7 @@ doforward(const char *direct, const fileheader_t * fh, int mode) if( mode == 'U' ){ vmsg("將進行 uuencode 。若您不清楚什麼是 uuencode 請改用 F轉寄。"); } + trim(address); if (address[0]) { snprintf(genbuf, sizeof(genbuf), @@ -1739,6 +1742,8 @@ doforward(const char *direct, const fileheader_t * fh, int mode) } } while (mode == 'Z' && strstr(address, MYHOSTNAME)); } + /* according to our experiment, many users leave blanks */ + trim(address); if (invalidaddr(address)) return -2; |