From 56b9bd28dcdf048e9513ed3e08c029db4f44cf47 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Mon, 16 Nov 2015 11:35:38 +0100 Subject: deny calling private methods, fixes #22 --- voctocore/lib/controlserver.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/voctocore/lib/controlserver.py b/voctocore/lib/controlserver.py index 90d4e7c..b0fe3d5 100644 --- a/voctocore/lib/controlserver.py +++ b/voctocore/lib/controlserver.py @@ -89,6 +89,11 @@ class ControlServer(TCPMultiConnection): response = None try: + # deny calling private methods + if command[0] == '_': + self.log.info('private methods are not callable') + raise KeyError() + command_function = self.commands.__class__.__dict__[command] except KeyError as e: -- cgit v1.2.3