Module: check_mk
Branch: master
Commit: 1eb2131d8d230951ae5d89630da8d92b35aa245f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1eb2131d8d2309…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Feb 27 13:10:35 2014 +0100
snapshots: fixed bug with customized wato backup_path
---
web/htdocs/wato.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 372ef61..dcd540b 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5933,10 +5933,9 @@ def get_snapshot_status(snapshot):
status["files"] = multitar.list_tar_content(snapshot_dir + name)
if status.get("type") == "legacy":
+ allowed_files = map(lambda x: "%s.tar" % x[1], backup_paths)
for tarname in status["files"].keys():
- if tarname not in ["check_mk.tar", "multisite.tar",
- "htpasswd.tar", "sites.tar",
"auth.secret.tar",
- "auth.serials.tar",
"usersettings.tar"]:
+ if tarname not in allowed_files:
raise MKGeneralException(_("Invalid snapshot (contains invalid
tarfile %s)") % tarname)
else: # new snapshots
for entry in ["comment", "created_by",
"type"]: