[gnome-initial-setup] password: Improve password hints
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] password: Improve password hints
- Date: Wed, 31 May 2017 09:07:36 +0000 (UTC)
commit 584a59d480ef8044475740bea964d84621cc3964
Author: Ondrej Holy <oholy redhat com>
Date: Tue May 30 11:04:39 2017 +0200
password: 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=783236
gnome-initial-setup/pages/password/pw-utils.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/pages/password/pw-utils.c b/gnome-initial-setup/pages/password/pw-utils.c
index fd77f80..89ed05b 100644
--- a/gnome-initial-setup/pages/password/pw-utils.c
+++ b/gnome-initial-setup/pages/password/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 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]