-
- Downloads
Confusing error when ipv6 policy lacks a port
Seems a bug in tor lets it accept torrc entries like... ExitPolicy reject6 [2a00:1450:4001:081e:0000:0000:0000:200e] This in turn causes us to crash with... Traceback (most recent call last): File "<console>", line 1, in <module> File "/home/atagar/Desktop/stem/stem/control.py", line 454, in wrapped return func(self, *args, **kwargs) File "/home/atagar/Desktop/stem/stem/control.py", line 1274, in get_exit_policy config_policy = stem.exit_policy.get_config_policy(policy, self.get_info('address', None)) File "/home/atagar/Desktop/stem/stem/exit_policy.py", line 156, in get_config_policy result.append(ExitPolicyRule(rule)) File "/home/atagar/Desktop/stem/stem/exit_policy.py", line 689, in __init__ self._apply_addrspec(rule, addrspec, is_ipv6_only) File "/home/atagar/Desktop/stem/stem/exit_policy.py", line 986, in _apply_addrspec raise ValueError("Address isn't a wildcard, IPv4, or IPv6 address: %s" % rule) ValueError: Address isn't a wildcard, IPv4, or IPv6 address: reject6 [2a00:1450:4001:081e:0000:0000:0000:200e] We should indeed reject it because it's missing the port from the end, but this error is confusing. Providing the error saying it isn't a 'addrspec:portspec' instead.
Please register or sign in to comment