Ryan Harper has posted comments on this change.
Change subject: engine.py: fail if Password doesn't match
......................................................................
Patch Set 3: (1 inline comment)
....................................................
File vdsm_reg/engine.py.in
Line 230: compatPort, sslPort = compatiblePort(enginePort)
Line 231:
Line 232: # Show error if the password informed by user doesn't match
Line 233: if self.pw_resp == PASSWORD_DOESNT_MATCH and
len(self.root_password_1.value()) > 0 or \
Line 234: self.pw_resp == PASSWORD_DOESNT_MATCH and
len(self.root_password_2.value()) > 0:
In the case where the user doesn't want to set password, since we still call
password check, but pass in empty password values, password_check returns (1,
'\n\n\n\n\n').
We want to ignore this case, but this patch will fail your if check based on
the len of password check you have, and fall into the else clause. I don't
think we want to try to set an empty password do we?
Is it possible to input a password_2 value if you don't set a password_1 value?
If not, then we only need to check the len of password_1 to determine if we're
in a not-setting-password case.
So, we could have:
if self.pw_resp == PASSWORD_MATCH:
<set password>
elif self.pw_resp == PASSWORD_DOESNT_MATCH and len(self.root_password_1.value()
> 0:
Button <pw_pcheck_msg>
return
and we ignore PASSWORD_DOESNT_MATCH and zero-length password (not-setting
password case).
Line 235:
Line 236: # Required since we now are verifying if the Confirm
Password were filled
Line 237: # and Password field not
Line 238: if self.pw_pcheck_msg.strip("\n") == "":
--
To view, visit http://gerrit.ovirt.org/7917
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I143906eb6ce61037418eac25567496c6628aede9
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Joey Boggs <[email protected]>
Gerrit-Reviewer: Ryan Harper <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches