[epiphany] Revert "Sanitize passwords from URLs before saving to history database"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Revert "Sanitize passwords from URLs before saving to history database"
- Date: Sat, 5 Nov 2016 12:58:51 +0000 (UTC)
commit a89a9b53afa708007628ffe55cb0bb895c2429e3
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Nov 5 07:58:31 2016 -0500
Revert "Sanitize passwords from URLs before saving to history database"
This reverts commit cbd0f2b43d468df2e7e3114d41787567bab57220.
lib/ephy-uri-helpers.c | 18 +++---------------
lib/ephy-uri-helpers.h | 1 -
lib/history/ephy-history-service.c | 8 +-------
3 files changed, 4 insertions(+), 23 deletions(-)
---
diff --git a/lib/ephy-uri-helpers.c b/lib/ephy-uri-helpers.c
index a597a23..857a2f9 100644
--- a/lib/ephy-uri-helpers.c
+++ b/lib/ephy-uri-helpers.c
@@ -264,10 +264,11 @@ ephy_uri_decode (const char *uri_string)
}
char *
-ephy_uri_sanitize (const char *uri_string)
+ephy_uri_decode_and_sanitize (const char *uri_string)
{
SoupURI *uri;
char *sanitized_uri;
+ char *result;
/* Trick: the parameter does not actually have to be a URI. We allow calling
* this function with any address, like about:blank. Just return in that case.
@@ -278,23 +279,10 @@ ephy_uri_sanitize (const char *uri_string)
/* Use soup_uri_to_string to remove the password component of the URI. */
sanitized_uri = soup_uri_to_string (uri, FALSE);
- soup_uri_free (uri);
-
- return sanitized_uri;
-}
-
-char *
-ephy_uri_decode_and_sanitize (const char *uri_string)
-{
-
- char *sanitized_uri;
- char *result;
-
- sanitized_uri = ephy_uri_sanitize (uri_string);
result = ephy_uri_decode (sanitized_uri);
g_free (sanitized_uri);
-
+ soup_uri_free (uri);
return result;
}
diff --git a/lib/ephy-uri-helpers.h b/lib/ephy-uri-helpers.h
index 02bf094..dfdfbf3 100644
--- a/lib/ephy-uri-helpers.h
+++ b/lib/ephy-uri-helpers.h
@@ -25,7 +25,6 @@
G_BEGIN_DECLS
char *ephy_remove_tracking_from_uri (const char *uri);
-char *ephy_uri_sanitize (const char *uri);
char *ephy_uri_decode_and_sanitize (const char *uri);
char *ephy_uri_normalize (const char *uri);
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index e290518..1a2fb3e 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -25,7 +25,6 @@
#include "ephy-history-types.h"
#include "ephy-history-type-builtins.h"
#include "ephy-sqlite-connection.h"
-#include "ephy-uri-helpers.h"
typedef gboolean (*EphyHistoryServiceMethod) (EphyHistoryService *self, gpointer data, gpointer
*result);
@@ -1291,16 +1290,13 @@ ephy_history_service_visit_url (EphyHistoryService *self,
EphyHistoryPageVisitType visit_type)
{
EphyHistoryPageVisit *visit;
- char *sanitized_uri;
g_return_if_fail (EPHY_IS_HISTORY_SERVICE (self));
g_return_if_fail (url != NULL);
g_signal_emit (self, signals[VISIT_URL], 0, url, visit_type);
- sanitized_uri = ephy_uri_sanitize (url);
-
- visit = ephy_history_page_visit_new (sanitized_uri,
+ visit = ephy_history_page_visit_new (url,
time (NULL),
visit_type);
ephy_history_service_add_visit (self,
@@ -1308,8 +1304,6 @@ ephy_history_service_visit_url (EphyHistoryService *self,
ephy_history_page_visit_free (visit);
ephy_history_service_queue_urls_visited (self);
-
- g_free (sanitized_uri);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]