summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/edit.c12
-rw-r--r--mbbsd/kaede.c17
-rw-r--r--mbbsd/pmore.c2
-rw-r--r--sample/pttbbs.conf3
4 files changed, 29 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);
diff --git a/sample/pttbbs.conf b/sample/pttbbs.conf
index a66a3812..8218b1de 100644
--- a/sample/pttbbs.conf
+++ b/sample/pttbbs.conf
@@ -14,6 +14,9 @@
* 下面這個是起始的種子值,請改成任意字串 (1~13 chars) */
#define REGCODE_MAGIC "pttbbs"
+/* 想減低系統安全性、讓人易於釣魚騙資料請開啟 */
+//#define LOW_SECURITY
+
/* 定義系統資訊 */
#define BBSUSER "bbs"
#define BBSUID 9999