Skip to content

Commit

Permalink
Prevent password showing in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
timcu committed Jan 1, 2021
1 parent bfaad3e commit 9896863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/ircbuilder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def send_string(self, s):
self.irc_disabled_message_printed = True
return
self.ircsock.send(encode(s.strip("\r\n") + "\n"))
if s.startswith('PRIVMSG') and ': cmd login' in s:
if s.startswith('PRIVMSG') and ': login' in s:
idx_pass = s.rfind(' ')
s = s[idx_pass] + ' <PASSWORD REMOVED FROM LOG>'
logger.info("SEND: " + s)
Expand Down Expand Up @@ -208,7 +208,7 @@ def wait_for_message_num(self, message_num, timeout=15.0):
return num
else:
time.sleep(0.1)
logger.warning(f"Timeout waiting for {message_num}")
logger.warning(f"Timeout waiting for {message_num}. Time taken {time.time() - start} ")
return None

def send_irccmd(self, msg): # send private message to mtbotnick
Expand Down
2 changes: 1 addition & 1 deletion python/ircbuilder/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = "0.0.9"
VERSION = "0.0.10"

0 comments on commit 9896863

Please sign in to comment.