diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-03 20:32:20 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-07-03 20:32:20 +0800 |
commit | 43d7446bb8b43450cbfcee6adce187c0d6b284c3 (patch) | |
tree | 7ff7ab94e4f1f0941ce47688dda34075fb672aab /mbbsd | |
parent | 728bd7471eb48701106ef65af331a0173a5d3903 (diff) | |
download | pttbbs-43d7446bb8b43450cbfcee6adce187c0d6b284c3.tar pttbbs-43d7446bb8b43450cbfcee6adce187c0d6b284c3.tar.gz pttbbs-43d7446bb8b43450cbfcee6adce187c0d6b284c3.tar.bz2 pttbbs-43d7446bb8b43450cbfcee6adce187c0d6b284c3.tar.lz pttbbs-43d7446bb8b43450cbfcee6adce187c0d6b284c3.tar.xz pttbbs-43d7446bb8b43450cbfcee6adce187c0d6b284c3.tar.zst pttbbs-43d7446bb8b43450cbfcee6adce187c0d6b284c3.zip |
make low security an option to be toggled
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2882 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/edit.c | 12 | ||||
-rw-r--r-- | mbbsd/kaede.c | 17 | ||||
-rw-r--r-- | mbbsd/pmore.c | 2 |
3 files changed, 26 insertions, 5 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c index bcc8e28e..54c515b4 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -1269,14 +1269,22 @@ do_quote(void) while (fgets(buf, 256, inf)) { insert_char(':'); insert_char(' '); +#ifdef LOW_SECURITY + insert_string(Ptt_prints(buf, STRIP_ALL)); +#else quote_strip_ansi_inline(buf); insert_string(buf); +#endif } else if (op == 'r') while (fgets(buf, 256, inf)) { /* repost, keep anything */ +#ifdef LOW_SECURITY + insert_string(Ptt_prints(buf, NO_RELOAD)); +#else // quote_strip_ansi_inline(buf); insert_string(buf); +#endif } else { if (curredit & EDIT_LIST) /* 去掉 mail list 之 header */ @@ -1287,8 +1295,12 @@ do_quote(void) if (!garbage_line(buf)) { insert_char(':'); insert_char(' '); +#ifdef LOW_SECURITY + insert_string(Ptt_prints(buf, STRIP_ALL)); +#else quote_strip_ansi_inline(buf); insert_string(buf); +#endif } } } diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c index b7f4ad56..b8fad1fc 100644 --- a/mbbsd/kaede.c +++ b/mbbsd/kaede.c @@ -28,6 +28,8 @@ Ptt_prints(char *str, int mode) /* disabled for security issue. * we support only entries can be queried by others now. + */ +#ifdef LOW_SECURITY case 'u': w += snprintf(&strbuf[w], sizeof(strbuf) - w, "%d", SHM->UTMPnumber); @@ -36,7 +38,16 @@ Ptt_prints(char *str, int mode) w += snprintf(&strbuf[w], sizeof(strbuf) - w, "%d/%d", cuser.month, cuser.day); break; - */ + case 'm': + w += snprintf(&strbuf[w], sizeof(strbuf) - w, + "%d", cuser.money); + break; +#else + case 'm': + w += snprintf(&strbuf[w], sizeof(strbuf) - w, + "%s", money_level(cuser.money)); + break; +#endif case 'l': w += snprintf(&strbuf[w], sizeof(strbuf) - w, @@ -50,10 +61,6 @@ Ptt_prints(char *str, int mode) strlcpy(strbuf+w, cuser.username, sizeof(strbuf)-w); w += strlen(strbuf+w); break; - case 'm': - w += snprintf(&strbuf[w], sizeof(strbuf) - w, - "%s", money_level(cuser.money)); - break; /* It's saver not to send these undefined escape string. default: strbuf[w++] = ESC_CHR; diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index ccb77c58..919bbb75 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -1230,9 +1230,11 @@ mf_display() else { Ptt_prints(buf, NO_RELOAD); // result in buf +#ifndef LOW_SECURITY override_attr = ANSI_COLOR(0;30;41); override_msg = " 注意: 此頁有控制碼," "若顯示您的個人資訊可能並非原內容 "; +#endif } i = strlen(buf); |