[epiphany] form-auth-data: Add debugging statements
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] form-auth-data: Add debugging statements
- Date: Fri, 3 Feb 2017 02:19:02 +0000 (UTC)
commit f90ce8b619f20204fd95c9356c7464012a117b2b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Thu Feb 2 19:13:05 2017 -0600
form-auth-data: Add debugging statements
lib/ephy-form-auth-data.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/lib/ephy-form-auth-data.c b/lib/ephy-form-auth-data.c
index bd06800..ac865df 100644
--- a/lib/ephy-form-auth-data.c
+++ b/lib/ephy-form-auth-data.c
@@ -21,6 +21,7 @@
#include "config.h"
#include "ephy-form-auth-data.h"
+#include "ephy-debug.h"
#include "ephy-uri-helpers.h"
#include <glib/gi18n.h>
@@ -110,6 +111,9 @@ ephy_form_auth_data_store (const char *uri,
g_return_if_fail (!form_username || username);
g_return_if_fail (!form_password || password);
+ LOG ("Storing password in secret service for uri=%s form_username=%s form_password=%s username=%s",
+ uri, form_username, form_password, username);
+
fake_uri = soup_uri_new (uri);
g_return_if_fail (fake_uri);
@@ -196,17 +200,20 @@ search_form_data_cb (SecretService *service,
goto out;
}
- if (!results)
+ if (!results) {
+ LOG ("...secret service query returned no result.");
goto out;
+ }
item = (SecretItem *)results->data;
attributes = secret_item_get_attributes (item);
username = g_hash_table_lookup (attributes, USERNAME_KEY);
value = secret_item_get_secret (item);
password = secret_value_get (value, NULL);
-
g_list_free_full (results, (GDestroyNotify)g_object_unref);
+ LOG ("...secret service query returned a password for username=%s.", username);
+
out:
if (closure->callback)
closure->callback (username, password, closure->data);
@@ -238,6 +245,9 @@ ephy_form_auth_data_query (const char *uri,
key = soup_uri_new (uri);
g_return_if_fail (key);
+ LOG ("Querying secret service for uri=%s form_username=%s form_password=%s username=%s...",
+ uri, form_username, form_password, username);
+
if (!form_username && g_strcmp0 (form_password, "adminpw") == 0)
normalize_and_prepare_uri (key, FALSE);
else
@@ -320,6 +330,8 @@ secret_service_search_finished (SecretService *service,
g_hash_table_unref (attributes);
}
+ LOG ("...successfully initialized form auth data cache.");
+
g_list_free_full (results, g_object_unref);
}
@@ -328,6 +340,8 @@ ephy_form_auth_data_cache_init (EphyFormAuthDataCache *cache)
{
GHashTable *attributes;
+ LOG ("Initializing form auth data cache %p...", cache);
+
attributes = secret_attributes_build (EPHY_FORM_PASSWORD_SCHEMA, NULL);
secret_service_search (NULL,
EPHY_FORM_PASSWORD_SCHEMA,
@@ -392,6 +406,9 @@ ephy_form_auth_data_cache_add (EphyFormAuthDataCache *cache,
g_return_if_fail (cache);
g_return_if_fail (uri);
+ LOG ("Adding uri=%s form_username=%s form_password=%s username=%s to form auth data cache %p",
+ uri, form_username, form_password, username, cache);
+
data = ephy_form_auth_data_new (form_username, form_password, username);
origin = ephy_uri_to_security_origin (uri);
l = g_hash_table_lookup (cache->form_auth_data_map, origin);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]