summaryrefslogtreecommitdiffstats
path: root/module/remote/RequestHandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/remote/RequestHandler.py')
-rw-r--r--module/remote/RequestHandler.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/module/remote/RequestHandler.py b/module/remote/RequestHandler.py
index 09ad5b548..1405fd3eb 100644
--- a/module/remote/RequestHandler.py
+++ b/module/remote/RequestHandler.py
@@ -30,7 +30,7 @@ class RequestHandler:
if obj.command == "exec":
func = getattr(self.core, obj.function)
- obj.response = func()
+ obj.response = func(*obj.args)
else:
obj.response = "antwort"
@@ -38,11 +38,15 @@ class RequestHandler:
def decrypt(self, dec_str):
- dec_str = base64.standard_b64decode(dec_str)
- dec_str = self.aes.decrypt(dec_str)
+ try:
+ dec_str = base64.standard_b64decode(dec_str)
+ dec_str = self.aes.decrypt(dec_str)
- dec_str = dec_str[:-(int(dec_str[-1], 16) + 1)]
- obj = cPickle.loads(dec_str)
+ dec_str = dec_str[:-(int(dec_str[-1], 16) + 1)]
+ obj = cPickle.loads(dec_str)
+ except:
+ obj = RequestObject()
+
return obj
def encrypt(self, obj):