From: H.G.Muller Date: Fri, 11 Mar 2016 13:25:19 +0000 (+0100) Subject: Do not save ICS password in command history X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=2a0c8134472cbaaa52ed196d851f1ba38f8c7784;p=xboard.git Do not save ICS password in command history Blanking out the password while typing it would have little effect if the arrow keys could recall is. So we don't save any lines in the history when echo is off. --- diff --git a/dialogs.c b/dialogs.c index 9def05c..50f40b1 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1310,10 +1310,12 @@ char *icsText; #define HISTORY_SIZE 64 static char *history[HISTORY_SIZE]; static int histIn = 0, histP = 0; +static Boolean noEcho; static void SaveInHistory (char *cmd) { + if(noEcho) return; // do not save password! if (history[histIn] != NULL) { free(history[histIn]); history[histIn] = NULL; @@ -2156,8 +2158,6 @@ ConsoleAutoPopUp (char *buf) } else PopUpMoveDialog(*buf); } -static Boolean noEcho; - void EchoOn () {