Module: check_mk
Branch: master
Commit: d0044b82dfea619ce9aab8de603dad5e199a12b7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0044b82dfea61…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 26 14:47:53 2016 +0200
ListChoice/SSHKeyPair: Fixed possible duplicate HTTP var in forms (add_var=True was
missing in hidden_field calls)
---
web/htdocs/valuespec.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index c8ac050..8e084c2 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -1765,7 +1765,7 @@ class ListChoice(ValueSpec):
html.write("</td>")
html.write("</tr></table>")
# Make sure that at least one variable with the prefix is present
- html.hidden_field(varprefix, "1")
+ html.hidden_field(varprefix, "1", add_var=True)
def value_to_text(self, value):
self.load_elements()
@@ -3908,7 +3908,7 @@ class SSHKeyPair(ValueSpec):
def render_input(self, varprefix, value):
if value:
html.write(_("Fingerprint: %s") % self.value_to_text(value))
- html.hidden_field(varprefix, self._encode_key_for_url(value))
+ html.hidden_field(varprefix, self._encode_key_for_url(value), add_var=True)
else:
html.write(_("Key pair will be generated when you save."))