summaryrefslogtreecommitdiff
path: root/voctocore/lib/controlserver.py
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2015-11-16 11:35:38 +0100
committerMaZderMind <github@mazdermind.de>2015-11-16 11:35:38 +0100
commit56b9bd28dcdf048e9513ed3e08c029db4f44cf47 (patch)
tree22a397024921a6299c94158fb0ed2eceeedc85a5 /voctocore/lib/controlserver.py
parentf1b9f483a6a9efb2bd9116d359f15e8aaa912bbe (diff)
deny calling private methods, fixes #22
Diffstat (limited to 'voctocore/lib/controlserver.py')
-rw-r--r--voctocore/lib/controlserver.py5
1 files changed, 5 insertions, 0 deletions
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: