Module: check_mk
Branch: master
Commit: 7647abef9cc090766221b6a9fadd9a8e0cb20838
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7647abef9cc090…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 13 14:42:17 2015 +0100
#2767 FIX Fixed broken user list when non unicode mail addresses are loaded
---
.werks/2767 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/userdb.py | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/.werks/2767 b/.werks/2767
new file mode 100644
index 0000000..e9feaad
--- /dev/null
+++ b/.werks/2767
@@ -0,0 +1,10 @@
+Title: Fixed broken user list when non unicode mail addresses are loaded
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i4
+Date: 1447422113
+
+
diff --git a/ChangeLog b/ChangeLog
index 2b7786e..03dca4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -115,6 +115,7 @@
* 2742 FIX: Make selection of folders and host group tag filter use nicer drawing
characters
* 2774 FIX: Fix exception when deleting certain types of MIBs
* 2760 FIX: Fixed case where "activate changes" was not commiting the
pending changes entries correctly...
+ * 2767 FIX: Fixed broken user list when non unicode mail addresses are loaded
Notifications:
* 2728 FIX: Removed debug notification script (was not executable)...
diff --git a/web/htdocs/userdb.py b/web/htdocs/userdb.py
index 299cb59..93871b1 100644
--- a/web/htdocs/userdb.py
+++ b/web/htdocs/userdb.py
@@ -307,6 +307,10 @@ def load_users(lock = False):
profile.update(user)
result[id] = profile
+ # Convert non unicode mail addresses
+ if type(profile.get("email")) == str:
+ profile["email"] =
profile["email"].decode("utf-8")
+
# This loop is only neccessary if someone has edited
# contacts.mk manually. But we want to support that as
# far as possible.