[epiphany] Revert "Sanitize passwords from URLs before displaying them"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Revert "Sanitize passwords from URLs before displaying them"
- Date: Sat, 5 Nov 2016 12:58:56 +0000 (UTC)
commit f6b6e00275d2b8b8f570713756b0572ea9d4c49c
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Nov 5 07:58:38 2016 -0500
Revert "Sanitize passwords from URLs before displaying them"
This reverts commit 34a55be44735a0f23b590a1db43f31cb68afc739.
embed/ephy-web-view.c | 6 +++---
lib/ephy-uri-helpers.c | 25 +------------------------
lib/ephy-uri-helpers.h | 2 +-
lib/widgets/ephy-download-widget.c | 2 +-
src/ephy-history-window.c | 2 +-
5 files changed, 7 insertions(+), 30 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 4a28ee1..4a00a60 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -892,7 +892,7 @@ ephy_web_view_set_address (EphyWebView *view,
view->address = g_strdup (address);
g_free (view->display_address);
- view->display_address = ephy_uri_decode_and_sanitize (view->address);
+ view->display_address = ephy_uri_decode (view->address);
is_blank = address == NULL ||
strcmp (address, "about:blank") == 0;
@@ -1432,7 +1432,7 @@ ephy_web_view_set_loading_message (EphyWebView *view,
char *decoded_address;
char *title;
- decoded_address = ephy_uri_decode_and_sanitize (address);
+ decoded_address = ephy_uri_decode (address);
title = ephy_embed_utils_get_title_from_address (decoded_address);
if (title != NULL && title[0] != '\0') {
@@ -2618,7 +2618,7 @@ ephy_web_view_set_link_message (EphyWebView *view,
g_free (view->link_message);
if (address) {
- decoded_address = ephy_uri_decode_and_sanitize (address);
+ decoded_address = ephy_uri_decode (address);
view->link_message = ephy_embed_utils_link_message_parse (decoded_address);
g_free (decoded_address);
} else {
diff --git a/lib/ephy-uri-helpers.c b/lib/ephy-uri-helpers.c
index 857a2f9..e0a1450 100644
--- a/lib/ephy-uri-helpers.c
+++ b/lib/ephy-uri-helpers.c
@@ -249,7 +249,7 @@ ephy_remove_tracking_from_uri (const char *uri_string)
return ret;
}
-static char *
+char *
ephy_uri_decode (const char *uri_string)
{
char *decoded_uri;
@@ -264,29 +264,6 @@ ephy_uri_decode (const char *uri_string)
}
char *
-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.
- */
- uri = soup_uri_new (uri_string);
- if (!uri)
- return g_strdup (uri_string);
-
- /* Use soup_uri_to_string to remove the password component of the URI. */
- sanitized_uri = soup_uri_to_string (uri, FALSE);
- result = ephy_uri_decode (sanitized_uri);
-
- g_free (sanitized_uri);
- soup_uri_free (uri);
- return result;
-}
-
-char *
ephy_uri_normalize (const char *uri_string)
{
SoupURI *uri;
diff --git a/lib/ephy-uri-helpers.h b/lib/ephy-uri-helpers.h
index dfdfbf3..4b77a96 100644
--- a/lib/ephy-uri-helpers.h
+++ b/lib/ephy-uri-helpers.h
@@ -25,7 +25,7 @@
G_BEGIN_DECLS
char *ephy_remove_tracking_from_uri (const char *uri);
-char *ephy_uri_decode_and_sanitize (const char *uri);
+char *ephy_uri_decode (const char *uri);
char *ephy_uri_normalize (const char *uri);
G_END_DECLS
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 62c760a..2e905c5 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -65,7 +65,7 @@ get_destination_basename_from_download (EphyDownload *ephy_download)
return NULL;
basename = g_filename_display_basename (dest);
- decoded = ephy_uri_decode_and_sanitize (basename);
+ decoded = ephy_uri_decode (basename);
g_free (basename);
return decoded;
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index b104a96..e8a39d2 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -718,7 +718,7 @@ convert_location_data_func (GtkTreeViewColumn *column,
col_id,
&url,
-1);
- decoded_url = ephy_uri_decode_and_sanitize (url);
+ decoded_url = ephy_uri_decode (url);
g_object_set (renderer, "text", decoded_url, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]