[node-patches] Change in ovirt-node[master]: tui: Only allow passwords without spaces

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Sep 13 14:33:56 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: tui: Only allow passwords without spaces
......................................................................

tui: Only allow passwords without spaces

Previously the only restriction on snmp passwords were a minimum length
of 8 chars, now we also enforce that it may not contain spaces as this
leads to client authentication errors.

Using a hex representation or quotes in the config file did not solve
the problem.

rhbz#854925

Change-Id: I2b2b0ee8e234e897d4037f4906db498f5b2fec29
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-config-setup.py
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/91/7991/1

diff --git a/scripts/ovirt-config-setup.py b/scripts/ovirt-config-setup.py
index c9e6e67..d064d6c 100755
--- a/scripts/ovirt-config-setup.py
+++ b/scripts/ovirt-config-setup.py
@@ -537,12 +537,16 @@
         resp, msg = password_check(self.root_password_1.value(),
                                    self.root_password_2.value())
         if self.__current_page == SNMP_PAGE:
-            if len(self.root_password_1.value()) < 8:
+            if (len(self.root_password_1.value()) < 8) and \
+               (len(self.root_password_2.value()) < 8):
                 self.root_password_1.set("")
-                msg = "Password must be at least 8 characters"
-            if len(self.root_password_2.value()) < 8:
                 self.root_password_2.set("")
-                msg = "Password must be at least 8 characters"
+                msg = "Password must be at least 8 characters\n\n\n\n\n"
+            elif (" " in self.root_password_1.value()) or \
+                 (" " in self.root_password_2.value()):
+                self.root_password_1.set("")
+                self.root_password_2.set("")
+                msg = "Password may not contain spaces\n\n\n\n\n"
         self.pw_msg.setText(msg)
         return
 


--
To view, visit http://gerrit.ovirt.org/7991
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b2b0ee8e234e897d4037f4906db498f5b2fec29
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list