Redact passwords that we send to NickServ from logs

We redacted PASS and SASL but neglected to redact messages to NickServ. whoops.
This commit is contained in:
Ryan Schmidt 2018-07-13 22:34:05 -07:00
parent e426c25ddd
commit 43471dcf03
No known key found for this signature in database
GPG Key ID: E0F0AE21C1C0CB86

View File

@ -353,16 +353,28 @@ class IRCClient:
self.send("WHO {0}".format(" ".join(args)))
def ns_identify(self, account, passwd, nickserv, command):
if command:
self.msg(nickserv, command.format(account=account, password=passwd))
cmdtext = command.format(account=account, password=passwd)
logtext = command.format(account=account, password="[redacted]")
msg = "PRIVMSG {0} :{1}"
self.send(msg.format(nickserv, cmdtext), log=msg.format(nickserv, logtext))
def ns_ghost(self, nick, password, nickserv, command):
if command:
self.msg(nickserv, command.format(nick=nick, password=password))
cmdtext = command.format(nick=nick, password=passwd)
logtext = command.format(nick=nick, password="[redacted]")
msg = "PRIVMSG {0} :{1}"
self.send(msg.format(nickserv, cmdtext), log=msg.format(nickserv, logtext))
def ns_release(self, nick, password, nickserv="NickServ", command="RELEASE {nick}"):
if command:
self.msg(nickserv, command.format(nick=nick, password=password))
cmdtext = command.format(nick=nick, password=passwd)
logtext = command.format(nick=nick, password="[redacted]")
msg = "PRIVMSG {0} :{1}"
self.send(msg.format(nickserv, cmdtext), log=msg.format(nickserv, logtext))
def ns_regain(self, nick, password, nickserv="NickServ", command="REGAIN {nick}"):
if command:
self.msg(nickserv, command.format(nick=nick, password=password))
cmdtext = command.format(nick=nick, password=passwd)
logtext = command.format(nick=nick, password="[redacted]")
msg = "PRIVMSG {0} :{1}"
self.send(msg.format(nickserv, cmdtext), log=msg.format(nickserv, logtext))
def user(self, ident, rname):
self.send("USER", ident, self.host, self.host, ":{0}".format(rname or ident))
def mainLoop(self):