[gnome-control-center/wip/oholy/password-dialog-hangs: 7/7] user-accounts: Fix password dialog hangs



commit 65d3b71d98694055d4868dfa9e725203ab413619
Author: Ondrej Holy <oholy redhat com>
Date:   Fri Nov 8 16:29:01 2019 +0100

    user-accounts: Fix password dialog hangs
    
    On Fedora 31, the "Current Password: " prompt is printed by passwd,
    when I enter my current password wrongly. It is not clear to me why
    and I don't know how to debug the PAM stack, but it causes that the
    checkmark for the old password field is not reliable and what is worse
    it causes the dialog hangs when it is submitted. Let's add check for
    the "urrent" keyword to fix this issue.
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/766

 panels/user-accounts/run-passwd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/panels/user-accounts/run-passwd.c b/panels/user-accounts/run-passwd.c
index 0fd06d903..19934f186 100644
--- a/panels/user-accounts/run-passwd.c
+++ b/panels/user-accounts/run-passwd.c
@@ -404,7 +404,9 @@ io_watch_stdout (GIOChannel *source, GIOCondition condition, PasswdHandler *pass
 
                         if (is_string_complete (str->str, "assword: ", "failure", "wrong", "error", NULL)) {
 
-                                if (strstr (str->str, "assword: ") != NULL && strstr (str->str, "incorrect") 
== NULL) {
+                                if (strstr (str->str, "assword: ") != NULL &&
+                                    strstr (str->str, "incorrect") == NULL &&
+                                    strstr (str->str, "urrent") == NULL) {
                                         /* Authentication successful */
 
                                         passwd_handler->backend_state = PASSWD_STATE_NEW;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]