user-accounts: Fix password strenght check
It is possible to use weak passwords in dialogs currently, which is not intentional and leads to problems in case of changing password of current user. This regression was introduced by Bug 780002, which added new strength level for weak passwords. Let's reflect the new level also when setting sensitivity... https://bugzilla.gnome.org/show_bug.cgi?id=788122
This commit is contained in:
parent
c6058080e3
commit
51c9a3235b
2 changed files with 2 additions and 2 deletions
|
@ -327,7 +327,7 @@ local_validate (UmAccountDialog *self)
|
|||
verify = gtk_entry_get_text (GTK_ENTRY (self->local_verify));
|
||||
if (self->local_password_mode == ACT_USER_PASSWORD_MODE_REGULAR) {
|
||||
strength = update_password_strength (self);
|
||||
valid_password = strength > 0 && strcmp (password, verify) == 0;
|
||||
valid_password = strength > 1 && strcmp (password, verify) == 0;
|
||||
} else {
|
||||
valid_password = TRUE;
|
||||
}
|
||||
|
|
|
@ -230,7 +230,7 @@ update_sensitivity (UmPasswordDialog *um)
|
|||
|
||||
if (um->password_mode == ACT_USER_PASSWORD_MODE_REGULAR) {
|
||||
strength = update_password_strength (um);
|
||||
can_change = strength > 0 && strcmp (password, verify) == 0 &&
|
||||
can_change = strength > 1 && strcmp (password, verify) == 0 &&
|
||||
(um->old_password_ok || !gtk_widget_get_visible (um->old_password_entry));
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue