r42484 - in /desktop/unstable/epiphany-browser/debian: changelog patches/ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch patches/series

jeansch-guest at users.alioth.debian.org jeansch-guest at users.alioth.debian.org
Fri Sep 5 16:08:46 UTC 2014


Author: jeansch-guest
Date: Fri Sep  5 16:08:46 2014
New Revision: 42484

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=42484
Log:
* debian/patches/ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch
 + Added. ephy-uri-helpers: Dot no modify the URI when it doesn't have garbage
   (Prevent to logout from gmail). (Closes: #705665).

Added:
    desktop/unstable/epiphany-browser/debian/patches/ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch
Modified:
    desktop/unstable/epiphany-browser/debian/changelog
    desktop/unstable/epiphany-browser/debian/patches/series

Modified: desktop/unstable/epiphany-browser/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/epiphany-browser/debian/changelog?rev=42484&op=diff
==============================================================================
--- desktop/unstable/epiphany-browser/debian/changelog	[utf-8] (original)
+++ desktop/unstable/epiphany-browser/debian/changelog	[utf-8] Fri Sep  5 16:08:46 2014
@@ -1,3 +1,11 @@
+epiphany-browser (3.12.1-3) UNRELEASED; urgency=medium
+
+  * debian/patches/ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch
+   + Added. ephy-uri-helpers: Dot no modify the URI when it doesn't have garbage
+     (Prevent to logout from gmail). (Closes: #705665).
+
+ -- Jean Schurger <jean at schurger.org>  Fri, 05 Sep 2014 10:46:28 -0400
+
 epiphany-browser (3.12.1-2) unstable; urgency=medium
 
   * debian/patches/ephy-title-box-Fix-crash-when-closing-second-windo.patch

Added: desktop/unstable/epiphany-browser/debian/patches/ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/epiphany-browser/debian/patches/ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch?rev=42484&op=file
==============================================================================
--- desktop/unstable/epiphany-browser/debian/patches/ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch	(added)
+++ desktop/unstable/epiphany-browser/debian/patches/ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch	[utf-8] Fri Sep  5 16:08:46 2014
@@ -0,0 +1,78 @@
+From ea6537f38237f4e5cfb424ec793c7f0aee4e6feb Mon Sep 17 00:00:00 2001
+From: Carlos Garcia Campos <cgarcia at igalia.com>
+Date: Tue, 20 May 2014 19:24:51 +0200
+Subject: ephy-uri-helpers: Dot no modify the URI when it doesn't have garbage
+
+We are currently decoding/encoding the uri query and returning it
+unchanged when it doesn't have garbage. We should return NULL instead in
+such case.
+This fixes the session management issues in some sites like gmail, but
+because the URLs processed don't actually have garbage. A URL with
+garbage and an underscore will still fail. This patch adds a unit test
+cover that particular case.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=730464
+
+diff --git a/lib/ephy-uri-helpers.c b/lib/ephy-uri-helpers.c
+index 2697dfa..5806e6f 100644
+--- a/lib/ephy-uri-helpers.c
++++ b/lib/ephy-uri-helpers.c
+@@ -223,6 +223,7 @@ ephy_remove_tracking_from_uri (const char *uri_string)
+   GList *items, *new_items, *l;
+   const char *query, *host;
+   char *new_query;
++  gboolean has_garbage = FALSE;
+   char *ret = NULL;
+ 
+   uri = soup_uri_new (uri_string);
+@@ -241,20 +242,25 @@ ephy_remove_tracking_from_uri (const char *uri_string)
+   new_items = NULL;
+   for (l = items; l != NULL; l = l->next) {
+     QueryItem *item = l->data;
++
+     if (!is_garbage (item->name, host))
+       new_items = g_list_prepend (new_items, item);
++    else
++      has_garbage = TRUE;
+   }
+-  new_items = g_list_reverse (new_items);
+ 
+-  new_query = query_encode (new_items);
++  if (has_garbage) {
++    new_items = g_list_reverse (new_items);
++    new_query = query_encode (new_items);
+ 
+-  g_list_free_full (items, (GDestroyNotify) query_item_free);
+-  g_list_free (new_items);
++    soup_uri_set_query (uri, new_query);
++    g_free (new_query);
+ 
+-  soup_uri_set_query (uri, new_query);
+-  g_free (new_query);
++    ret = soup_uri_to_string (uri, FALSE);
++  }
+ 
+-  ret = soup_uri_to_string (uri, FALSE);
++  g_list_free_full (items, (GDestroyNotify) query_item_free);
++  g_list_free (new_items);
+ 
+ bail:
+   soup_uri_free (uri);
+diff --git a/tests/ephy-uri-helpers-test.c b/tests/ephy-uri-helpers-test.c
+index b17334b..1d9fc8d 100644
+--- a/tests/ephy-uri-helpers-test.c
++++ b/tests/ephy-uri-helpers-test.c
+@@ -47,6 +47,10 @@ test_ephy_uri_helpers_remove_tracking (void)
+     /* https://bugzilla.gnome.org/show_bug.cgi?id=724724 */
+     { "http://git.savannah.gnu.org/gitweb/?p=grep.git;a=commit;h=97318f5e59a1ef6feb8a378434a00932a3fc1e0b",
+       "http://git.savannah.gnu.org/gitweb/?p=grep.git;a=commit;h=97318f5e59a1ef6feb8a378434a00932a3fc1e0b"},
++    /* https://bugzilla.gnome.org/show_bug.cgi?id=730464 */
++    { "https://mail.google.com/mail/u/0/?ui=2&ik=37373eb942&rid=7cea..&auto=1&view=lno&_reqid=1168127&pcd=1&mb=0&rt=j",
++      "https://mail.google.com/mail/u/0/?ui=2&ik=37373eb942&rid=7cea..&auto=1&view=lno&_reqid=1168127&pcd=1&mb=0&rt=j" },
++    { "http://www.test.com/?utm_source=feedburner&view=lno&_reqid=1234", "http://www.test.com/?view=lno&_reqid=1234" },
+   };
+   guint i;
+ 
+-- 
+cgit v0.10.1
+

Modified: desktop/unstable/epiphany-browser/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/epiphany-browser/debian/patches/series?rev=42484&op=diff
==============================================================================
--- desktop/unstable/epiphany-browser/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/epiphany-browser/debian/patches/series	[utf-8] Fri Sep  5 16:08:46 2014
@@ -2,3 +2,4 @@
 00_epiphany-browser.patch
 07_bookmarks.patch
 12_safetypes.patch
+ephy-uri-helpers-Dot-no-modify-the-URI-when-it-doesn-t-have-garbage.patch




More information about the pkg-gnome-commits mailing list