From 262e5c330438a497c22bc4b2d39eedc0cc10fe44 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Wed, 9 Nov 2011 21:05:17 +0100 Subject: [PATCH] Check style domains for other schemes than http(s) The latest libSoup versions transparently opens file:// URLs as directory listings and there may be more. --- extensions/addons.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/addons.c b/extensions/addons.c index 076f0e9c..e87ce0f9 100644 --- a/extensions/addons.c +++ b/extensions/addons.c @@ -1047,7 +1047,8 @@ css_metadata_from_file (const gchar* filename, ++end; domain = g_strndup (value + begin, end - begin * 2); - if (strncmp ("http", domain, 4)) + if (!midori_uri_is_location (domain) + && !g_str_has_prefix (domain, "file://")) tmp_domain = g_strdup_printf ("http://*%s/*", domain); else tmp_domain = domain; -- 2.39.5