diff options
author | MaZderMind <github@mazdermind.de> | 2015-11-16 11:35:38 +0100 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2015-11-16 11:35:38 +0100 |
commit | 56b9bd28dcdf048e9513ed3e08c029db4f44cf47 (patch) | |
tree | 22a397024921a6299c94158fb0ed2eceeedc85a5 | |
parent | f1b9f483a6a9efb2bd9116d359f15e8aaa912bbe (diff) |
deny calling private methods, fixes #22
-rw-r--r-- | voctocore/lib/controlserver.py | 5 |
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: |