Module: check_mk
Branch: master
Commit: 1b28b7fabb3eec74627cd193a02e807d4aa8f1fc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b28b7fabb3eec…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 17 11:10:18 2017 +0100
4204 FIX Prevent password completion for all WATO rule where passwords are being
specified
Most browsers try to autofill password input fields in forms.
While this is useful in most times it is very nasty in WATO
rules where passwords are being configured. This not only
destroys existing passwords when loading and saving a rule. It
also renders the {{view in plaintext}} button useless.
This has been fixed for all browsers.
Change-Id: Idcc0debe1926e931aca85d1e47e230b8dd55e7bd
---
.werks/4204 | 16 ++++++++++++++++
web/htdocs/wato.py | 1 +
2 files changed, 17 insertions(+)
diff --git a/.werks/4204 b/.werks/4204
new file mode 100644
index 0000000..2776d62
--- /dev/null
+++ b/.werks/4204
@@ -0,0 +1,16 @@
+Title: Prevent password completion for all WATO rule where passwords are being specified
+Level: 2
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.5.0i1
+Date: 1487326105
+
+Most browsers try to autofill password input fields in forms.
+While this is useful in most times it is very nasty in WATO
+rules where passwords are being configured. This not only
+destroys existing passwords when loading and saving a rule. It
+also renders the {{view in plaintext}} button useless.
+
+This has been fixed for all browsers.
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 37a65f8..9932440 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -13327,6 +13327,7 @@ class ModeEditRule(WatoMode):
if valuespec:
forms.header(valuespec.title() or _("Value"))
forms.section()
+ html.prevent_password_auto_completion()
try:
valuespec.validate_datatype(self._rule.value, "ve")
valuespec.render_input("ve", self._rule.value)