Module: check_mk
Branch: master
Commit: 8a0972769a0efca1a349f66f6ba585c98e9a4178
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8a0972769a0efc…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Apr 30 09:32:02 2012 +0200
FIX: Fixed problem with new eval/pickle
---
ChangeLog | 1 +
web/htdocs/wato.py | 12 ++++--------
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6d7939f..1411682 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
* Filter for times now accept ranges (from ... until)
* New view setting for page header: repeat. This repeats the
column headers every 20'th row.
+ * FIX: Fixed problem with new eval/pickle
Checks & Agents:
* FIX: Made logwatch parsing mechanism a little more robust
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 7d28b1b..f0bb2be 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10983,17 +10983,13 @@ def validate_all_hosts(hostnames, force_all = False):
# | Functions needed at various places |
# '----------------------------------------------------------------------'
+import base64
+
def mk_eval(s):
- if config.debug:
- return eval(s)
- else:
- return pickle.loads(s)
+ return pickle.loads(base64.b64decode(s))
def mk_repr(s):
- if config.debug:
- return repr(s)
- else:
- return pickle.dumps(s)
+ return base64.b64encode(pickle.dumps(s))
# Returns true when at least one folder is defined in WATO
def have_folders():