From 102e251c547deacdb5bda75800fec623a42fb030 Mon Sep 17 00:00:00 2001 From: Andy Graulund Date: Wed, 11 Jan 2017 21:30:06 +0100 Subject: [PATCH] Censor password in debug output --- lib/irc.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/irc.js b/lib/irc.js index 23ccfe08..05b14071 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -930,8 +930,15 @@ Client.prototype.send = function(command) { args[args.length - 1] = ':' + args[args.length - 1]; } - if (this.opt.debug) - util.log('SEND: ' + args.join(' ')); + if (this.opt.debug) { + var line; + if (command === 'PASS') { + line = 'PASS [censored]'; + } else { + line = args.join(' '); + } + util.log('SEND: ' + line); + } if (!this.conn.requestedDisconnect) { this.conn.write(args.join(' ') + '\r\n');