diff --git a/peershandler.py b/peershandler.py index 441f9e0..a2c1a0d 100644 --- a/peershandler.py +++ b/peershandler.py @@ -269,8 +269,11 @@ def is_allowed(self, peer_ip, command=''): # Always allow whitelisted ip to post as block if 'block' == command and self.is_whitelisted(peer_ip): return True + # always allowed commands, only required and non cpu intensive. + if command in ('portget',): + return True # only allow local host for "stop" and addpeers command - if command in ['stop', 'addpeers']: + if command in ('stop', 'addpeers'): return peer_ip == '127.0.0.1' return peer_ip in self.config.allowed or "any" in self.config.allowed