diff --git a/README.rst b/README.rst index bc2596f..3809828 100644 --- a/README.rst +++ b/README.rst @@ -127,6 +127,15 @@ Roadmap ChangeLog ========= +Version 1.0.9 +------------- + +- ignore peers not appearing in their features list +- validate hostnames in Env object +- added tests for env.py +- Einsteinium support and contrib script shebang fix (erasmospunk) +- set last_good only if successfully verified + Version 1.0.8 ------------- diff --git a/server/env.py b/server/env.py index c9f0b56..94072ec 100644 --- a/server/env.py +++ b/server/env.py @@ -127,7 +127,7 @@ class Env(lib_util.LoggedClass): ip = ip_address(host) except ValueError: bad = (not lib_util.is_valid_hostname(host) - or hostname.lower() == 'localhost') + or host.lower() == 'localhost') else: bad = (ip.is_multicast or ip.is_unspecified or (ip.is_private and (self.irc or self.peer_announce))) diff --git a/server/version.py b/server/version.py index f6327f9..fc5a6f8 100644 --- a/server/version.py +++ b/server/version.py @@ -1,5 +1,5 @@ # Server name and protocol versions -VERSION = 'ElectrumX 1.0.8b' +VERSION = 'ElectrumX 1.0.9' PROTOCOL_MIN = '1.0' PROTOCOL_MAX = '1.0' diff --git a/tests/server/test_env.py b/tests/server/test_env.py index 088fa54..4a7f944 100644 --- a/tests/server/test_env.py +++ b/tests/server/test_env.py @@ -203,6 +203,9 @@ def test_clearnet_identity(): with pytest.raises(Env.Error): Env() os.environ['REPORT_HOST'] = '224.0.0.2' + with pytest.raises(Env.Error): + Env() + os.environ['REPORT_HOST'] = '$HOST' with pytest.raises(Env.Error): Env() # Accept private IP, unless IRC or PEER_ANNOUNCE