From aee7ac3583feffa68770b3606bf069b9da2216be Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 22 Feb 2016 07:09:56 -0800 Subject: [PATCH 1/2] Socket: drop SSL-related logging from critical to warning / error, and fix spacing --- src/drivers/Socket.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py index ad4b563c3..820d3e1ac 100644 --- a/src/drivers/Socket.py +++ b/src/drivers/Socket.py @@ -280,7 +280,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): if network_config.ssl(): self.starttls() elif not network_config.requireStarttls(): - drivers.log.critical(('Connection to network %s' + drivers.log.warning(('Connection to network %s ' 'does not use SSL/TLS, which makes it vulnerable to ' 'man-in-the-middle attacks and passive eavesdropping. ' 'You should consider upgrading your connection to SSL/TLS ' @@ -375,7 +375,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): trusted_fingerprints=network_config.ssl.serverFingerprints(), ) except ssl.CertificateError as e: - drivers.log.critical(('Certificate validation failed when ' + drivers.log.error(('Certificate validation failed when ' 'connecting to %s: %s\n' 'This means someone is doing a man-in-the-middle attack ' 'on your connection, or the server\'s certificate is ' @@ -384,7 +384,7 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): raise ssl.SSLError('Aborting because of failed certificate ' 'verification.') except ssl.SSLError as e: - drivers.log.critical(('Certificate validation failed when ' + drivers.log.error(('Certificate validation failed when ' 'connecting to %s: %s\n' 'This means someone is doing a man-in-the-middle attack ' 'on your connection, or because the server\'s ' From b3441263187ec7ceb286cb3450f6573888e524da Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 23 Feb 2016 07:29:16 -0800 Subject: [PATCH 2/2] Socket: update logging text to flow better --- src/drivers/Socket.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py index 820d3e1ac..2ac6fd2f9 100644 --- a/src/drivers/Socket.py +++ b/src/drivers/Socket.py @@ -377,8 +377,8 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): except ssl.CertificateError as e: drivers.log.error(('Certificate validation failed when ' 'connecting to %s: %s\n' - 'This means someone is doing a man-in-the-middle attack ' - 'on your connection, or the server\'s certificate is ' + 'This means either someone is doing a man-in-the-middle ' + 'attack on your connection, or the server\'s certificate is ' 'not in your trusted fingerprints list.') % (self.irc.network, e.args[0])) raise ssl.SSLError('Aborting because of failed certificate ' @@ -386,8 +386,8 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): except ssl.SSLError as e: drivers.log.error(('Certificate validation failed when ' 'connecting to %s: %s\n' - 'This means someone is doing a man-in-the-middle attack ' - 'on your connection, or because the server\'s ' + 'This means either someone is doing a man-in-the-middle ' + 'attack on your connection, or the server\'s ' 'certificate is not trusted.') % (self.irc.network, e.args[1])) raise ssl.SSLError('Aborting because of failed certificate '