Updating branch refs/heads/master to 57b093293a1ad2d67c5659cc319f3bcedbada721 (commit) from 5396456ec29afb076b1d186b61c9cd47dde3b642 (commit)
commit 57b093293a1ad2d67c5659cc319f3bcedbada721 Author: Christian Dywan <christ...@twotoasts.de> Date: Tue Jan 3 23:47:11 2012 +0100 Only strip referrer from valid Soup URI Fixes: https://bugs.launchpad.net/midori/+bug/909415 midori/main.c | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/midori/main.c b/midori/main.c index 3800457..e7843d1 100644 --- a/midori/main.c +++ b/midori/main.c @@ -958,16 +958,19 @@ midori_soup_session_settings_accept_language_cb (SoupSession* session, if (referer && destination && !strstr (referer, destination->host)) { SoupURI* stripped_uri = soup_uri_new (referer); - gchar* stripped_referer; - soup_uri_set_path (stripped_uri, NULL); - soup_uri_set_query (stripped_uri, NULL); - stripped_referer = soup_uri_to_string (stripped_uri, FALSE); - soup_uri_free (stripped_uri); - if (g_getenv ("MIDORI_SOUP_DEBUG")) - g_message ("Referer stripped"); - soup_message_headers_replace (msg->request_headers, "Referer", - stripped_referer); - g_free (stripped_referer); + if (stripped_uri != NULL) + { + gchar* stripped_referer; + soup_uri_set_path (stripped_uri, NULL); + soup_uri_set_query (stripped_uri, NULL); + stripped_referer = soup_uri_to_string (stripped_uri, FALSE); + soup_uri_free (stripped_uri); + if (g_getenv ("MIDORI_SOUP_DEBUG")) + g_message ("Referer %s stripped to %s", referer, stripped_referer); + soup_message_headers_replace (msg->request_headers, "Referer", + stripped_referer); + g_free (stripped_referer); + } } } } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits