Module: check_mk
Branch: master
Commit: d86e560c6952d4712930ff427b3de55c9f918f5f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d86e560c6952d4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 6 10:12:59 2016 +0100
4131 FIX Fixed broken WATO site login when using password containing special characters
Some special characters could confuse the WATO site login and lead to an error
message like "HTTP error - None:".
---
.werks/4131 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/4131 b/.werks/4131
new file mode 100644
index 0000000..3e4715e
--- /dev/null
+++ b/.werks/4131
@@ -0,0 +1,11 @@
+Title: Fixed broken WATO site login when using password containing special characters
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i3
+Date: 1481015489
+
+Some special characters could confuse the WATO site login and lead to an error
+message like "HTTP error - None:".
diff --git a/ChangeLog b/ChangeLog
index 5145b8b..f161607 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -84,6 +84,7 @@
* 4082 FIX: Icon selector: Fixed exception in case non images are saved in icon
folder
* 4084 FIX: Improved error handling in case of broken hosts.mk files
* 4130 FIX: Improved error handling when trying to edit not existant rules
+ * 4131 FIX: Fixed broken WATO site login when using password containing special
characters...
Notifications:
* 4042 FIX: Fix missing From address in synchronous SMTP notifications...
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 3672778..bb514b4 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -3359,7 +3359,7 @@ def do_site_login(site_id, name, password):
def get_url(url, insecure, user=None, password=None, params = '', post_data =
None):
cred = ''
if user:
- cred = ' -u "%s:%s"' % (user, password)
+ cred = ' -u %s' % quote_shell_string("%s:%s" % (user,
password))
insecure = insecure and ' --insecure' or ''