Module: check_mk
Branch: master
Commit: 6d72c5af83db6926d7c033197ea16301f3dbc90d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6d72c5af83db69…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Sep 18 08:51:55 2015 +0200
#2610 FIX Fixed host search showing results of not permitted folder
---
.werks/2610 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/.werks/2610 b/.werks/2610
new file mode 100644
index 0000000..c8b696a
--- /dev/null
+++ b/.werks/2610
@@ -0,0 +1,10 @@
+Title: Fixed host search showing results of not permitted folder
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1442559080
+
+
diff --git a/ChangeLog b/ChangeLog
index e15c45b..11e3c61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -266,6 +266,7 @@
* 2552 FIX: API: Service Discovery action is now creating missing pending log entry
and marks the site dirty
* 2560 FIX: Fixed rare exception when using bulk host move...
* 2603 FIX: Git integration: Preventing issues with *.mk.new files...
+ * 2610 FIX: Fixed host search showing results of not permitted folder
Notifications:
* 2478 Integrated notification plugin for mobile phone push messages via Pushover...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 48950c6..4635fdb 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3491,6 +3491,10 @@ def search_hosts_in_folders(folder, crit):
def search_hosts_in_folder(folder, crit):
found = []
+
+ if check_folder_permissions(folder, "read", exception=False) != True:
+ return 0
+
hosts = load_hosts(folder)
for hostname, host in hosts.items():
if crit[".name"] and crit[".name"].lower() not in
hostname.lower():