[about-me] Don't hang when new and old password only differ in case

'passwd' returns an error when the new and the old passwords only differ in case. If we don't handle this (unlikely) case, users-admin hangs. Assimilate this error to "passwords are too similar".
This commit is contained in:
Milan Bouchet-Valat 2010-03-23 20:43:16 +01:00
parent 4b3d1c8043
commit 8a31bf892c

View file

@ -506,6 +506,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi
"dictionary",
"simple",
"similar",
"case",
"wrapped",
"recovered",
"unchanged",
@ -540,6 +541,7 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswordDialog *pdi
g_strrstr (str->str, "dictionary") != NULL) {
msg = g_strdup (_("The password is too simple."));
} else if (g_strrstr (str->str, "similar") != NULL ||
g_strrstr (str->str, "case") != NULL ||
g_strrstr (str->str, "wrapped") != NULL) {
msg = g_strdup (_("The old and new passwords are too similar."));
} else if (g_strrstr (str->str, "1 numeric or special") != NULL) {