Merge branch 'feature/handle_auth_rejection' into 'main'

gdbusauth: fix retry mechanism for failed authentication attempts

See merge request GNOME/glib!2682
This commit is contained in:
Leif Middelschulte 2024-07-15 23:06:42 +00:00
commit d5c3c9b71c

View File

@ -649,7 +649,6 @@ _g_dbus_auth_run_client (GDBusAuth *auth,
goto out;
debug_print ("CLIENT: WaitingForReject, read '%s'", line);
choose_mechanism:
if (!g_str_has_prefix (line, "REJECTED "))
{
g_set_error (error,
@ -668,6 +667,7 @@ _g_dbus_auth_run_client (GDBusAuth *auth,
g_printerr ("supported_auth_mechs[%d] = '%s'\n", n, supported_auth_mechs[n]);
#endif
}
choose_mechanism:
g_free (line);
mech = client_choose_mech_and_send_initial_response (auth,
credentials,
@ -724,7 +724,7 @@ _g_dbus_auth_run_client (GDBusAuth *auth,
goto out;
}
}
else if (g_str_has_prefix (line, "REJECTED "))
else if (g_str_has_prefix (line, "REJECTED"))
{
goto choose_mechanism;
}