summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-04 21:53:22 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-07-04 21:53:22 +0800
commitc9f10663bdf8e2210b5fe117193cbc5452e0a35e (patch)
treeceda541e9b3064f09175b194601d4984f4c5ae68
parent7204388338e4e7445afd399a2e1c4947f86fbce3 (diff)
downloadpttbbs-c9f10663bdf8e2210b5fe117193cbc5452e0a35e.tar
pttbbs-c9f10663bdf8e2210b5fe117193cbc5452e0a35e.tar.gz
pttbbs-c9f10663bdf8e2210b5fe117193cbc5452e0a35e.tar.bz2
pttbbs-c9f10663bdf8e2210b5fe117193cbc5452e0a35e.tar.lz
pttbbs-c9f10663bdf8e2210b5fe117193cbc5452e0a35e.tar.xz
pttbbs-c9f10663bdf8e2210b5fe117193cbc5452e0a35e.tar.zst
pttbbs-c9f10663bdf8e2210b5fe117193cbc5452e0a35e.zip
let ansi move cmds back
and add more security stuff git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2888 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/edit.c2
-rw-r--r--mbbsd/kaede.c10
-rw-r--r--mbbsd/pmore.c12
3 files changed, 19 insertions, 5 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 36b7837b..e50c8ad3 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1269,7 +1269,7 @@ do_quote(void)
while (fgets(buf, 256, inf)) {
insert_char(':');
insert_char(' ');
-#ifdef LOW_SECURITY
+#if 0 // def LOW_SECURITY
insert_string(Ptt_prints(buf, STRIP_ALL));
#else
quote_strip_ansi_inline(buf);
diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c
index 33b5e826..da6fd0cd 100644
--- a/mbbsd/kaede.c
+++ b/mbbsd/kaede.c
@@ -30,10 +30,16 @@ Ptt_prints(char *str, int mode)
* we support only entries can be queried by others now.
*/
#ifdef LOW_SECURITY
+
+#if 0
+ // even in low security, this is still
+ // not needed - who needs utmp number?
+ // only crackers?
case 'u':
w += snprintf(&strbuf[w], sizeof(strbuf) - w,
"%d", SHM->UTMPnumber);
break;
+#endif
case 'b':
w += snprintf(&strbuf[w], sizeof(strbuf) - w,
"%d/%d", cuser.month, cuser.day);
@@ -43,12 +49,16 @@ Ptt_prints(char *str, int mode)
"%d", cuser.money);
break;
#else
+
+#if 0
case 'm':
w += snprintf(&strbuf[w], sizeof(strbuf) - w,
"%s", money_level(cuser.money));
break;
#endif
+#endif
+
case 'l':
w += snprintf(&strbuf[w], sizeof(strbuf) - w,
"%d", cuser.numlogins);
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c
index 919bbb75..9fac9dfa 100644
--- a/mbbsd/pmore.c
+++ b/mbbsd/pmore.c
@@ -45,7 +45,7 @@
#define PMORE_USE_OPT_SCROLL // optimized scroll
#define PMORE_USE_DBCS_WRAP // safe wrap for DBCS.
#define PMORE_USE_ASCII_MOVIE // support ascii movie
-#define PMORE_RESTRICT_ANSI_MOVEMENT // user cannot use ANSI escapes to move
+//#define PMORE_RESTRICT_ANSI_MOVEMENT // user cannot use ANSI escapes to move
#define PMORE_WORKAROUND_POORTERM // try to work with poor terminal sys
#define PMORE_ACCURATE_WRAPEND // try more harder to find file end in wrap mode
@@ -1182,9 +1182,13 @@ mf_display()
break;
default:
-#ifdef PMORE_RESTRICT_ANSI_MOVEMENT
if(ANSI_IN_MOVECMD(c))
+#ifdef PMORE_RESTRICT_ANSI_MOVEMENT
c = 's'; // "save cursor pos"
+#else
+ // some user cannot live without this.
+ // make them happy.
+ newline = MFDISP_NEWLINE_MOVE;
#endif
outc(c);
break;
@@ -1230,10 +1234,10 @@ mf_display()
else
{
Ptt_prints(buf, NO_RELOAD); // result in buf
-#ifndef LOW_SECURITY
+#if 1 //ndef LOW_SECURITY
override_attr = ANSI_COLOR(0;30;41);
override_msg = " 注意: 此頁有控制碼,"
- "若顯示您的個人資訊可能並非原內容 ";
+ "若顯示您個人資訊可能並非原內容";
#endif
}
i = strlen(buf);