[gnome-initial-setup] password: visibly warn the user when the password is bad
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] password: visibly warn the user when the password is bad
- Date: Sat, 16 May 2015 20:59:17 +0000 (UTC)
commit 3049f2cc46e014aa7cac46a89ac94561c4249ced
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Jan 30 13:53:50 2015 -0600
password: visibly warn the user when the password is bad
https://bugzilla.gnome.org/show_bug.cgi?id=735578
.../pages/password/gis-password-page.c | 5 +++
gnome-initial-setup/pages/password/pw-utils.c | 34 ++++++++++----------
2 files changed, 22 insertions(+), 17 deletions(-)
---
diff --git a/gnome-initial-setup/pages/password/gis-password-page.c
b/gnome-initial-setup/pages/password/gis-password-page.c
index 58bd7c5..ab56896 100644
--- a/gnome-initial-setup/pages/password/gis-password-page.c
+++ b/gnome-initial-setup/pages/password/gis-password-page.c
@@ -126,6 +126,11 @@ validate (GisPasswordPage *page)
gtk_level_bar_set_value (GTK_LEVEL_BAR (priv->password_strength), strength_level);
gtk_label_set_label (GTK_LABEL (priv->password_explanation), long_hint);
+ if (strlen (password) > 0 && strength_level <= 0)
+ set_entry_validation_error (GTK_ENTRY (priv->password_entry), _("This is a weak password."));
+ else
+ clear_entry_validation_error (GTK_ENTRY (priv->password_entry));
+
priv->valid_confirm = (strcmp (password, verify) == 0);
if (strlen (password) > 0 && strlen (verify) > 0) {
if (!priv->valid_confirm) {
diff --git a/gnome-initial-setup/pages/password/pw-utils.c b/gnome-initial-setup/pages/password/pw-utils.c
index c6e5135..6025277 100644
--- a/gnome-initial-setup/pages/password/pw-utils.c
+++ b/gnome-initial-setup/pages/password/pw-utils.c
@@ -80,39 +80,39 @@ pw_error_hint (gint error)
case PWQ_ERROR_SAME_PASSWORD:
return C_("Password hint", "The new password needs to be different from the old one.");
case PWQ_ERROR_CASE_CHANGES_ONLY:
- return C_("Password hint", "Try changing some letters and numbers.");
+ return C_("Password hint", "This password is very similar to your last one. Try changing
some letters and numbers.");
case PWQ_ERROR_TOO_SIMILAR:
- return C_("Password hint", "Try changing the password a bit more.");
+ return C_("Password hint", "This password is very similar to your last one. Try changing the
password a bit more.");
case PWQ_ERROR_USER_CHECK:
- return C_("Password hint", "A password without your user name would be stronger.");
+ return C_("Password hint", "This is a weak password. A password without your user name would
be stronger.");
case PWQ_ERROR_GECOS_CHECK:
- return C_("Password hint", "Try to avoid using your name in the password.");
+ return C_("Password hint", "This is a weak password. Try to avoid using your name in the
password.");
case PWQ_ERROR_BAD_WORDS:
- return C_("Password hint", "Try to avoid some of the words included in the password.");
+ return C_("Password hint", "This is a weak password. Try to avoid some of the words included
in the password.");
case PWQ_ERROR_ROTATED:
- return C_("Password hint", "Try changing the password a bit more.");
+ return C_("Password hint", "This password is very similar to your last one. Try changing the
password a bit more.");
case PWQ_ERROR_CRACKLIB_CHECK:
- return C_("Password hint", "Try to avoid common words.");
+ return C_("Password hint", "This is a weak password. Try to avoid common words.");
case PWQ_ERROR_PALINDROME:
- return C_("Password hint", "Try to avoid reordering existing words.");
+ return C_("Password hint", "This is a weak password. Try to avoid reordering existing
words.");
case PWQ_ERROR_MIN_DIGITS:
- return C_("Password hint", "Try to use more numbers.");
+ return C_("Password hint", "This is a weak password. Try to use more numbers.");
case PWQ_ERROR_MIN_UPPERS:
- return C_("Password hint", "Try to use more uppercase letters.");
+ return C_("Password hint", "This is a weak password. Try to use more uppercase letters.");
case PWQ_ERROR_MIN_LOWERS:
- return C_("Password hint", "Try to use more lowercase letters.");
+ return C_("Password hint", "This is a weak password. Try to use more lowercase letters.");
case PWQ_ERROR_MIN_OTHERS:
- return C_("Password hint", "Try to use more special characters, like punctuation.");
+ return C_("Password hint", "This is a weak password. Try to use more special characters,
like punctuation.");
case PWQ_ERROR_MIN_CLASSES:
- return C_("Password hint", "Try to use a mixture of letters, numbers and punctuation.");
+ return C_("Password hint", "This is a weak password. Try to use a mixture of letters,
numbers and punctuation.");
case PWQ_ERROR_MAX_CONSECUTIVE:
- return C_("Password hint", "Try to avoid repeating the same character.");
+ return C_("Password hint", "This is a weak password. Try to avoid repeating the same
character.");
case PWQ_ERROR_MAX_CLASS_REPEAT:
- return C_("Password hint", "Try to avoid repeating the same type of character: you need to
mix up letters, numbers and punctuation.");
+ return C_("Password hint", "This is a weak password. Try to avoid repeating the same type of
character: you need to mix up letters, numbers and punctuation.");
case PWQ_ERROR_MAX_SEQUENCE:
- return C_("Password hint", "Try to avoid sequences like 1234 or abcd.");
+ return C_("Password hint", "This is a weak password. 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", "This is a weak password. Try to add more letters, numbers and
symbols.");
case PWQ_ERROR_EMPTY_PASSWORD:
return C_("Password hint", "Mix uppercase and lowercase and use a number or two.");
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]