[epiphany/gnome-3-26] sync-service: Handle the case when secret_item_get_secret() returns NULL
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-26] sync-service: Handle the case when secret_item_get_secret() returns NULL
- Date: Tue, 26 Sep 2017 01:25:53 +0000 (UTC)
commit a8cf04b688a0b4b7e3f2db28e054e6e9d1296382
Author: Gabriel Ivascu <gabrielivascu gnome org>
Date: Tue Sep 26 01:23:06 2017 +0300
sync-service: Handle the case when secret_item_get_secret() returns NULL
https://bugzilla.gnome.org/show_bug.cgi?id=788140
lib/sync/ephy-sync-service.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/lib/sync/ephy-sync-service.c b/lib/sync/ephy-sync-service.c
index b922491..c27ea20 100644
--- a/lib/sync/ephy-sync-service.c
+++ b/lib/sync/ephy-sync-service.c
@@ -1458,6 +1458,12 @@ load_secrets_cb (SecretService *service,
}
value = secret_item_get_secret ((SecretItem *)res->data);
+ if (!value) {
+ g_warning ("Failed to retrieve the value of the sync secrets");
+ message = _("The sync secrets for the current sync user are invalid.");
+ goto out_error;
+ }
+
node = json_from_string (secret_value_get_text (value), &error);
if (error) {
g_warning ("Sync secrets are not a valid JSON: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]