]> spindle.queued.net Git - midori/commitdiff
Check style domains for other schemes than http(s)
authorChristian Dywan <christian@twotoasts.de>
Wed, 9 Nov 2011 20:05:17 +0000 (21:05 +0100)
committerChristian Dywan <christian@twotoasts.de>
Wed, 9 Nov 2011 21:06:10 +0000 (22:06 +0100)
The latest libSoup versions transparently opens file:// URLs
as directory listings and there may be more.

extensions/addons.c

index 076f0e9cc57c0b08113e1c0e5a273505b49e04d4..e87ce0f94c16259c62d82f7f78558b0a6d0a414e 100644 (file)
@@ -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;