54 lines
2.7 KiB
Diff
54 lines
2.7 KiB
Diff
diff -up gnome-online-accounts-3.50.2/src/goabackend/goafedoraprovider.c.2 gnome-online-accounts-3.50.2/src/goabackend/goafedoraprovider.c
|
|
--- gnome-online-accounts-3.50.2/src/goabackend/goafedoraprovider.c.2 2024-05-25 18:27:06.000000000 +0200
|
|
+++ gnome-online-accounts-3.50.2/src/goabackend/goafedoraprovider.c 2024-06-26 14:48:43.970418551 +0200
|
|
@@ -321,18 +321,24 @@ add_account_action_cb (GoaProviderDialog
|
|
return;
|
|
|
|
/* Reset the temporary account watch */
|
|
- g_free (data->identity);
|
|
+ g_clear_pointer (&data->identity, g_free);
|
|
g_clear_object (&data->object);
|
|
if (data->client_source != NULL)
|
|
{
|
|
g_source_destroy (data->client_source);
|
|
g_source_unref (data->client_source);
|
|
+ data->client_source = NULL;
|
|
}
|
|
|
|
username = gtk_editable_get_text (GTK_EDITABLE (data->username));
|
|
password = gtk_editable_get_text (GTK_EDITABLE (data->password));
|
|
provider_type = goa_provider_get_provider_type (provider);
|
|
- parse_principal (username, &data->identity);
|
|
+ if (!parse_principal (username, &data->identity))
|
|
+ {
|
|
+ error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, _("Faild to get principal from user name “%s”"), username);
|
|
+ goa_provider_task_return_error (task, g_steal_pointer (&error));
|
|
+ return;
|
|
+ }
|
|
|
|
/* If this is duplicate account we're finished */
|
|
if (!goa_utils_check_duplicate (data->client,
|
|
diff -up gnome-online-accounts-3.50.2/src/goabackend/goautils.c.2 gnome-online-accounts-3.50.2/src/goabackend/goautils.c
|
|
--- gnome-online-accounts-3.50.2/src/goabackend/goautils.c.2 2024-05-25 18:27:06.000000000 +0200
|
|
+++ gnome-online-accounts-3.50.2/src/goabackend/goautils.c 2024-06-26 14:48:43.970418551 +0200
|
|
@@ -670,6 +670,7 @@ goa_utils_set_error_soup (GError **err,
|
|
case SOUP_STATUS_INTERNAL_SERVER_ERROR:
|
|
case SOUP_STATUS_NOT_IMPLEMENTED:
|
|
error_msg = g_strdup (_("Not supported"));
|
|
+ break;
|
|
|
|
case SOUP_STATUS_NOT_FOUND:
|
|
error_msg = g_strdup (_("Not found"));
|
|
diff -up gnome-online-accounts-3.50.2/src/goabackend/goawebdavprovider.c.2 gnome-online-accounts-3.50.2/src/goabackend/goawebdavprovider.c
|
|
--- gnome-online-accounts-3.50.2/src/goabackend/goawebdavprovider.c.2 2024-06-26 14:50:38.747965297 +0200
|
|
+++ gnome-online-accounts-3.50.2/src/goabackend/goawebdavprovider.c 2024-06-26 14:50:56.283201602 +0200
|
|
@@ -1005,7 +1005,7 @@ refresh_account_action_cb (GoaProviderDi
|
|
username = gtk_editable_get_text (GTK_EDITABLE (data->username));
|
|
password = gtk_editable_get_text (GTK_EDITABLE (data->password));
|
|
|
|
- g_free (data->presentation_identity);
|
|
+ g_clear_pointer (&data->presentation_identity, g_free);
|
|
uri = dav_normalize_uri (uri_text, NULL, &server);
|
|
if (strchr (username, '@') != NULL)
|
|
g_set_str (&data->presentation_identity, username);
|