[gnome-control-center] user-accounts: Improve password hints
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: Improve password hints
- Date: Wed, 3 May 2017 09:41:05 +0000 (UTC)
commit cd1f96f8ba8bb995b6a95a1b19c4df15ff916ced
Author: Ondrej Holy <oholy redhat com>
Date: Wed Apr 5 13:30:51 2017 +0200
user-accounts: Improve password hints
Don't say "Good password!" for all acceptable password (e.g. weak passwords).
Say explicitely that password needs to be longer for short passwords.
https://bugzilla.gnome.org/show_bug.cgi?id=780002
panels/user-accounts/pw-utils.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/panels/user-accounts/pw-utils.c b/panels/user-accounts/pw-utils.c
index 49d2f77..8b2c39f 100644
--- a/panels/user-accounts/pw-utils.c
+++ b/panels/user-accounts/pw-utils.c
@@ -112,11 +112,11 @@ pw_error_hint (gint error)
case PWQ_ERROR_MAX_SEQUENCE:
return C_("Password hint", "Try to avoid sequences like 1234 or abcd.");
case PWQ_ERROR_MIN_LENGTH:
- return C_("Password hint", "Try to add more letters, numbers and symbols.");
+ return C_("Password hint", "Password needs to be longer. Try to add more letters, numbers
and punctuation.");
case PWQ_ERROR_EMPTY_PASSWORD:
return C_("Password hint", "Mix uppercase and lowercase and try to use a number or two.");
default:
- return C_("Password hint", "Good password! Adding more letters, numbers and punctuation will
make it stronger.");
+ return C_("Password hint", "Adding more letters, numbers and punctuation will make the
password stronger.");
}
}
@@ -152,7 +152,10 @@ pw_strength (const gchar *password,
level = 5;
}
- *hint = pw_error_hint (rv);
+ if (length && length < pw_min_length())
+ *hint = pw_error_hint (PWQ_ERROR_MIN_LENGTH);
+ else
+ *hint = pw_error_hint (rv);
if (strength_level)
*strength_level = level;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]