diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-28 19:59:26 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-28 19:59:26 +0800 |
commit | 1f16f74c574f6d609dde9b071b0d271069d3dc48 (patch) | |
tree | 0cb38a3f978ab30c9adf8ca6c414b14581729fdd /mbbsd | |
parent | 76c3cd196a66c1e8a1df39d6cca858cb722986ee (diff) | |
download | pttbbs-1f16f74c574f6d609dde9b071b0d271069d3dc48.tar pttbbs-1f16f74c574f6d609dde9b071b0d271069d3dc48.tar.gz pttbbs-1f16f74c574f6d609dde9b071b0d271069d3dc48.tar.bz2 pttbbs-1f16f74c574f6d609dde9b071b0d271069d3dc48.tar.lz pttbbs-1f16f74c574f6d609dde9b071b0d271069d3dc48.tar.xz pttbbs-1f16f74c574f6d609dde9b071b0d271069d3dc48.tar.zst pttbbs-1f16f74c574f6d609dde9b071b0d271069d3dc48.zip |
- mail/Forward: prevent assert error by checking valid userid.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4253 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/mail.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c index cc19fee3..29340dbc 100644 --- a/mbbsd/mail.c +++ b/mbbsd/mail.c @@ -2057,6 +2057,12 @@ doforward(const char *direct, const fileheader_t * fh, int mode) } // now the xid holds local name + if (!is_validuserid(xid) || + searchuser(xid, xid) <= 0) + { + vmsg("找不到此使用者 ID。"); + return 1; + } sethomefile(fpath, xid, FN_OVERRIDES); i = belong(fpath, cuser.userid); sethomefile(fpath, xid, FN_REJECT); |