diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2013-02-07 01:40:51 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2013-02-07 01:40:51 +0800 |
commit | 12477938807e5f2852dcfadc8798f35f587a8fba (patch) | |
tree | 93be171ad39653de4018d4d34d2141a883eae99a | |
parent | f42007878be40e378ae856a8799ac61ced26ef25 (diff) | |
download | pttbbs-12477938807e5f2852dcfadc8798f35f587a8fba.tar pttbbs-12477938807e5f2852dcfadc8798f35f587a8fba.tar.gz pttbbs-12477938807e5f2852dcfadc8798f35f587a8fba.tar.bz2 pttbbs-12477938807e5f2852dcfadc8798f35f587a8fba.tar.lz pttbbs-12477938807e5f2852dcfadc8798f35f587a8fba.tar.xz pttbbs-12477938807e5f2852dcfadc8798f35f587a8fba.tar.zst pttbbs-12477938807e5f2852dcfadc8798f35f587a8fba.zip |
Block privilege escalation through digest mode and mailbox
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5788 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/mail.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/mail.c b/pttbbs/mbbsd/mail.c index 8a2224a6..68aa1b06 100644 --- a/pttbbs/mbbsd/mail.c +++ b/pttbbs/mbbsd/mail.c @@ -2093,12 +2093,15 @@ m_read(void) return DONOTHING; if (get_num_records(currmaildir, sizeof(fileheader_t))) { + int was_in_digest = currmode & MODE_DIGEST; + currmode &= ~MODE_DIGEST; curredit = EDIT_MAIL; back_bid = currbid; currbid = 0; i_read(RMAIL, currmaildir, mailtitle, maildoent, mail_comms, -1); currbid = back_bid; curredit = 0; + currmode |= was_in_digest; setmailalert(); return 0; } else { |