aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-08-13 22:33:26 +0800
committerChristian Persch <chpe@src.gnome.org>2005-08-13 22:33:26 +0800
commit5053d123082a01a657b3f34538702a8245aa3d34 (patch)
tree91b0cd639b68899c60aa1e6abfb334bf590beb15 /embed
parente853d7394fde1468f5e20107f28cdc07b37c042b (diff)
downloadgsoc2013-epiphany-5053d123082a01a657b3f34538702a8245aa3d34.tar
gsoc2013-epiphany-5053d123082a01a657b3f34538702a8245aa3d34.tar.gz
gsoc2013-epiphany-5053d123082a01a657b3f34538702a8245aa3d34.tar.bz2
gsoc2013-epiphany-5053d123082a01a657b3f34538702a8245aa3d34.tar.lz
gsoc2013-epiphany-5053d123082a01a657b3f34538702a8245aa3d34.tar.xz
gsoc2013-epiphany-5053d123082a01a657b3f34538702a8245aa3d34.tar.zst
gsoc2013-epiphany-5053d123082a01a657b3f34538702a8245aa3d34.zip
Only allow http: favicons.
2005-08-13 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyBrowser.cpp: Only allow http: favicons. * embed/mozilla/mozilla-embed.cpp: Remove unnecessary casts.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyBrowser.cpp5
-rw-r--r--embed/mozilla/mozilla-embed.cpp14
2 files changed, 12 insertions, 7 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 363131c70..03e2e51b2 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -180,6 +180,11 @@ EphyDOMLinkEventListener::HandleEvent (nsIDOMEvent* aDOMEvent)
EphyUtils::NewURI (getter_AddRefs (favUri), faviconUrl);
NS_ENSURE_TRUE (favUri, NS_ERROR_FAILURE);
+ /* Only proceed for http favicons. Bug #312291 */
+ PRBool isHttp = PR_FALSE;
+ favUri->SchemeIs ("http", &isHttp);
+ if (!isHttp) return NS_OK;
+
/* check if load is allowed */
nsCOMPtr<nsIScriptSecurityManager> secMan
(do_GetService("@mozilla.org/scriptsecuritymanager;1"));
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 7344241a9..bf31d1fb6 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -337,25 +337,25 @@ mozilla_embed_init (MozillaEmbed *embed)
embed->priv = MOZILLA_EMBED_GET_PRIVATE (embed);
embed->priv->browser = new EphyBrowser ();
- g_signal_connect_object (G_OBJECT (embed), "location",
+ g_signal_connect_object (embed, "location",
G_CALLBACK (mozilla_embed_location_changed_cb),
embed, (GConnectFlags) 0);
- g_signal_connect_object (G_OBJECT (embed), "net_state_all",
+ g_signal_connect_object (embed, "net_state_all",
G_CALLBACK (mozilla_embed_net_state_all_cb),
embed, (GConnectFlags) 0);
- g_signal_connect_object (G_OBJECT (embed), "dom_mouse_click",
+ g_signal_connect_object (embed, "dom_mouse_click",
G_CALLBACK (mozilla_embed_dom_mouse_click_cb),
embed, (GConnectFlags) 0);
- g_signal_connect_object (G_OBJECT (embed), "dom_mouse_down",
+ g_signal_connect_object (embed, "dom_mouse_down",
G_CALLBACK (mozilla_embed_dom_mouse_down_cb),
embed, (GConnectFlags) 0);
- g_signal_connect_object (G_OBJECT (embed), "dom-key-press",
+ g_signal_connect_object (embed, "dom-key-press",
G_CALLBACK (mozilla_embed_dom_key_press_cb),
embed, (GConnectFlags) 0);
- g_signal_connect_object (G_OBJECT (embed), "new_window",
+ g_signal_connect_object (embed, "new_window",
G_CALLBACK (mozilla_embed_new_window_cb),
embed, (GConnectFlags) 0);
- g_signal_connect_object (G_OBJECT (embed), "security_change",
+ g_signal_connect_object (embed, "security_change",
G_CALLBACK (mozilla_embed_security_change_cb),
embed, (GConnectFlags) 0);
}