Commit Graph

74 Commits

Author SHA1 Message Date
Valentin Lorentz
78cf550674 Socket: fix crash on Python versions that do no support certificate validation. 2016-02-23 16:25:37 +01:00
Valentin Lorentz
a7096f8b3e Disable SSL cert verification by default.
Having it enabled by default would break existing bots just by
doing the update.
Let's just show a warning and give owners some time to update
their config, for the moment.
2016-02-21 14:47:44 +01:00
Valentin Lorentz
ae560dbd2a Add supybot.protocols.ssl.verifyCertificates.
And remove unused variable supybot.protocols.ssl.verifyMode.
2016-02-21 14:42:41 +01:00
Valentin Lorentz
e77e78e79e Add support for using server certificate fingerprint instead of CA signature. 2016-02-21 14:18:14 +01:00
Valentin Lorentz
d922af1043 Verify server certificate, and deprecate Python < 2.7.9. Closes GH-1031. 2016-02-21 13:20:09 +01:00
Valentin Lorentz
10522857b1 Fix activation of SSL for connections using SOCKS. 2015-12-18 20:33:36 +01:00
Valentin Lorentz
4b1c766b42 Add support for STARTTLS (not tested). 2015-12-12 16:40:48 +01:00
Valentin Lorentz
912d2e1538 core: Apply some suggestions of pyflakes. 2015-08-31 18:19:22 +02:00
Valentin Lorentz
c01a956a8b utils: Remove dependency on parent package. 2015-08-30 17:33:39 +02:00
Valentin Lorentz
c3a2c800f1 Remove need for 2to3. 2015-08-11 16:50:23 +02:00
Valentin Lorentz
216c5d213f Replace sys.version_info[0] usages with minisix.PY{2,3}. 2015-08-09 00:23:03 +02:00
Valentin Lorentz
eca7a036aa Socket: Move line decoding to utils.str. 2015-05-16 00:30:20 +02:00
Valentin Lorentz
537f9b3461 Socket: catch connection errors. 2014-08-30 12:11:00 +02:00
nyuszika7h
fa06f2af34 Add protocols.irc.certfile
Fixes #612.
2014-06-04 19:12:56 +02:00
Valentin Lorentz
dcb25db6e5 Add support for SRV records in domain name resolution. 2014-03-01 09:22:14 +01:00
Valentin Lorentz
108b0de0d1 Add support of IP-binding in non-IRC connections. 2014-03-01 09:06:21 +01:00
Valentin Lorentz
1fbdedc7e0 Continue accelerating the 2to3 step (remove fix_funcattrs, fix_itertools, and fix_itertools_imports). 2014-01-21 10:50:55 +01:00
Valentin Lorentz
bb7db3ab21 Continue accelerating the 2to3 step (remove fix_except). 2014-01-20 15:49:15 +01:00
Valentin Lorentz
4652c9ce51 Start accelerating the 2to3 step (remove fix_apply, fix_buffer, fix_callable, fix_exec, fix_execfile, fix_exitfunc, fix_filter, fix_funcattrs, fix_future, fix_getcwdu, and fix_has_key). 2014-01-20 14:49:47 +01:00
Valentin Lorentz
0ecdb87aef Fix crash in sending queued messages if SocketDriver.irc is None. 2013-12-27 13:15:45 +00:00
Valentin Lorentz
c774013e1f Socket: Only call self.irc.feedMsg if self.irc is not None (ie. a reconnect is not in progress). 2013-12-05 12:37:00 +00:00
Valentin Lorentz
583b1baf64 Socket: Fix commit 4c24f30. 2013-12-03 05:44:50 +00:00
Valentin Lorentz
9a83b741ea Socket: Only display the missing cert file warning if a cert file path is given. 2013-11-27 16:44:15 +00:00
Valentin Lorentz
4c24f30504 Socket: Check if certertificate file exists before using it. 2013-11-27 07:26:09 +00:00
Valentin Lorentz
e65a722b2f Add certfp support. Closes GH-468. 2013-11-10 11:45:01 +01:00
Valentin Lorentz
9d2c43d2f4 Socket: Trigger reconnect if socket file number has been set to -1. 2013-11-09 15:47:36 +00:00
Valentin Lorentz
40675ffdfa Merge remote-tracking branch 'supybot/master' into testing
Conflicts:
	plugins/Admin/plugin.py
	plugins/BadWords/config.py
	plugins/Filter/plugin.py
	plugins/Google/plugin.py
	plugins/Math/plugin.py
	plugins/Misc/plugin.py
	plugins/Note/plugin.py
	plugins/RSS/plugin.py
	plugins/Seen/test.py
	plugins/ShrinkUrl/config.py
	plugins/ShrinkUrl/plugin.py
	plugins/ShrinkUrl/test.py
	plugins/Status/plugin.py
	plugins/String/config.py
	plugins/String/plugin.py
	plugins/Time/plugin.py
	plugins/Todo/plugin.py
	plugins/Web/plugin.py
	plugins/__init__.py
	scripts/supybot-botchk
	setup.py
	src/__init__.py
	src/callbacks.py
	src/commands.py
	src/conf.py
	src/drivers/Socket.py
	src/ircdb.py
	src/irclib.py
	src/ircutils.py
	src/questions.py
	src/registry.py
	src/schedule.py
	src/test.py
	src/utils/file.py
	src/utils/gen.py
	src/utils/net.py
	src/utils/web.py
	src/world.py
2013-08-24 11:28:29 +02:00
James McCoy
ea7f1f8419 Socket: Match the expected API of reconnect
driver.reconnect(wait=True) should flag a driver to reconnect, but not
immediately.  The Socket driver lost its handling of this flag in
8730832e.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-24 00:29:16 -04:00
James McCoy
5b329df6f0 Socket: Try all resolved addresses before scheduling a reconnect
Instead of assuming the first address returned from getaddrinfo can be
reached, try each one in turn until a connection is established.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-22 23:43:09 -04:00
Valentin Lorentz
dd37f8dd3f Socket: Forward DNS queries via the socks proxy (if any). 2013-08-17 15:47:39 +02:00
Valentin Lorentz
573d4a0158 Silence errors in Socket driver if connecting failed (name resolution, ...). 2013-08-09 12:59:42 +02:00
Valentin Lorentz
dce3c97fe4 Socket: Only catch select.error if it is an interupted system call. 2013-06-29 13:44:42 +02:00
Valentin Lorentz
75654a4544 Socket: Prevent crash caused when a signal is received while using select. Closes GH-477. 2013-06-29 12:40:45 +02:00
Carsten Teibes
7129dc2697 Switch to charade, which is better maintained and works under 2 and 3 2013-06-27 19:36:44 +02:00
Valentin Lorentz
8aba15807d Socket: Assert 'irc' is not None. 2013-06-01 12:08:12 +02:00
Valentin Lorentz
2016983d35 Add supybot.utils.net.getAddressFromHostname() and improve Socket driver to try successively all IP addresses. 2013-05-31 17:21:10 +02:00
Valentin Lorentz
ddd8314884 Socket: Close the socket more nicely. 2013-03-27 16:32:26 +01:00
Valentin Lorentz
cac96aa5f7 Socket: Fix race condition in SSL handshakes. 2013-03-21 17:21:20 +00:00
Valentin Lorentz
7f2d38b885 Socket: Fix compatibility with Python 3.1. 2013-02-22 20:43:27 +00:00
Valentin Lorentz
7588472f36 Fix 'Transport endpoint not connected' errors. Closes GH-437. 2013-01-31 16:47:17 +01:00
Alexander Ralph Michael Minges
bbdd55bea2 Add fallback decoding if chardet fails to guess the correct encoding 2013-01-20 17:07:58 +01:00
Alexander Ralph Michael Minges
4316e5936e Use chardet to guess the character encoding when on python3 2013-01-15 20:55:42 +01:00
Valentin Lorentz
3dba9088b0 Merge remote-tracking branch 'supybot/master' into testing
Conflicts:
	INSTALL
	plugins/ChannelLogger/README.txt
	plugins/ChannelStats/README.txt
	plugins/Google/plugin.py
	plugins/Google/test.py
	plugins/Plugin/test.py
	plugins/Web/test.py
	setup.py
	src/callbacks.py
	src/ircdb.py
	src/irclib.py
	src/utils/str.py
	test/test_irclib.py
2013-01-01 21:11:24 +01:00
Valentin Lorentz
7b3ef56116 Fix mysterious bug when connecting/disconnecting. 2012-12-26 19:58:39 +01:00
Valentin Lorentz
790f0eea35 socket: Fix compatibility issue with Python 3 (introduced in 8cf094a). 2012-12-26 15:03:57 +01:00
Valentin Lorentz
69c60ca1f5 Remove debug output. 2012-12-08 05:16:00 +00:00
Valentin Lorentz
8cf094a628 Socket: Use select.select() instead of checking sockets one by one. Closes GH-431. Closes GH-420. 2012-12-07 21:41:50 +01:00
Valentin Lorentz
7d22d3dc36 Prevent NameError if ssl module can't be imported. 2012-12-07 01:48:05 +00:00
Valentin Lorentz
6b881d6509 Socket driver: Apply supybot.drivers.poll as soon as modified (do not require reconnect). 2012-10-10 19:39:28 +02:00
Valentin Lorentz
156b3d93e1 Socket driver: Add support for Socks proxies. 2012-10-07 13:13:08 +02:00