Module: check_mk
Branch: master
Commit: d57c728c295fdbfdf4758f96b4468e4cd267b56d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d57c728c295fdb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 23 12:00:08 2017 +0200
5401 FIX Fixed password auto completion prevention for current Chrome versions
Change-Id: I3c583ee458d9748011ee505f18b9205c2fb0345d
---
.werks/5401 | 11 +++++++++++
web/htdocs/valuespec.py | 3 ++-
web/htdocs/wato.py | 4 +++-
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/5401 b/.werks/5401
new file mode 100644
index 0000000..b415a13
--- /dev/null
+++ b/.werks/5401
@@ -0,0 +1,11 @@
+Title: Fixed password auto completion prevention for current Chrome versions
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1508752658
+
+
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index 762c49a..b29f9df 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3852,7 +3852,7 @@ class LDAPDistinguishedName(TextUnicode):
class Password(TextAscii):
def __init__(self, **kwargs):
self._is_stored_plain = kwargs.get("is_stored_plain", True)
- self._autocomplete = kwargs.get("autocomplete", False)
+ kwargs.setdefault("autocomplete", False)
if self._is_stored_plain:
plain_help = _("The password entered here is stored in plain text within
the "
@@ -3867,6 +3867,7 @@ class Password(TextAscii):
TextAscii.__init__(self, attrencode = True, **kwargs)
+
def render_input(self, varprefix, value):
self.classtype_info()
if value == None:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index baf2155..ee7de23 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2573,11 +2573,13 @@ def mode_diag_host(phase):
html.open_table()
html.open_tr()
html.open_td()
+
html.begin_form('diag_host', method = "POST")
+ html.prevent_password_auto_completion()
+
forms.header(_('Host Properties'))
forms.section(legend = False)
- html.prevent_password_auto_completion()
# The diagnose page shows both snmp variants at the same time
# We need to analyse the preconfigured community and set either the