Limit data: for main content to images

This commit is contained in:
Christian Dywan 2012-09-05 00:04:58 +02:00
parent 6210c59e31
commit e2c9660b3a

View file

@ -952,6 +952,13 @@ midori_view_web_view_navigation_decision_cb (WebKitWebView* web_view
return TRUE; return TRUE;
} }
} }
else if (g_str_has_prefix (uri, "data:image/"))
{
/* For security reasons, main content served as data: is limited to images
http://lcamtuf.coredump.cx/switch/ */
webkit_web_policy_decision_ignore (decision);
return TRUE;
}
#ifdef HAVE_GCR #ifdef HAVE_GCR
else if (/* view->special && */ !strncmp (uri, "https", 5)) else if (/* view->special && */ !strncmp (uri, "https", 5))
{ {