[epiphany] Sanitize passwords from URLs before storing as bookmarks
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Sanitize passwords from URLs before storing as bookmarks
- Date: Mon, 17 Oct 2016 16:41:51 +0000 (UTC)
commit ed8685d320901f84e9c3f4787c06d3b3d0ba8fdd
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Oct 17 08:27:20 2016 -0500
Sanitize passwords from URLs before storing as bookmarks
src/bookmarks/ephy-add-bookmark-popover.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/bookmarks/ephy-add-bookmark-popover.c b/src/bookmarks/ephy-add-bookmark-popover.c
index 01c3d2a..e22bbea 100644
--- a/src/bookmarks/ephy-add-bookmark-popover.c
+++ b/src/bookmarks/ephy-add-bookmark-popover.c
@@ -27,6 +27,7 @@
#include "ephy-embed-container.h"
#include "ephy-location-entry.h"
#include "ephy-shell.h"
+#include "ephy-uri-helpers.h"
struct _EphyAddBookmarkPopover {
GtkPopover parent_instance;
@@ -176,14 +177,16 @@ ephy_add_bookmark_popover_show (EphyAddBookmarkPopover *self)
EphyWindow *window;
EphyEmbed *embed;
EphyBookmark *bookmark;
- const char *address;
+ const char *unsanitized_address;
+ char *address;
manager = ephy_shell_get_bookmarks_manager (ephy_shell_get_default ());
location_entry = GTK_WIDGET (ephy_header_bar_get_title_widget (self->header_bar));
window = ephy_header_bar_get_window (self->header_bar);
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
- address = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
+ unsanitized_address = ephy_web_view_get_address (ephy_embed_get_web_view (embed));
+ address = ephy_uri_sanitize (unsanitized_address);
bookmark = ephy_bookmarks_manager_get_bookmark_by_url (manager, address);
if (!bookmark) {
@@ -216,4 +219,6 @@ ephy_add_bookmark_popover_show (EphyAddBookmarkPopover *self)
}
gtk_widget_show (GTK_WIDGET (self));
+
+ g_free (address);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]