[Webkit-unassigned] [Bug 28490] New: Allow excluding certain plugins from loading

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 20 08:17:13 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28490

           Summary: Allow excluding certain plugins from loading
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Enhancement
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: damarvy at gmail.com



Marius Renn <damarvy at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35205|                            |review?
               Flag|                            |


Created an attachment (id=35205)
 --> (https://bugs.webkit.org/attachment.cgi?id=35205)
Proposed patch to implement the plugin loading delegation described in the
feature request.

It is well known that web plugins may misbehave, in the worst case causing the
browser to crash. This can happen as early as plugin loading, as dynamically
linked plugin initialization code may be executed at this time. In many cases,
programs may not want to change the plugin directory from which to load from.
Instead they want to filter the list of plugins to load. Thus, I propose to
allow WebKit applications to exclude plugins either by path or other plugin
details (name, version, ...). This can be done by assigning a delegate to the
PluginDatabase singleton instance, which can make a decision on whether or not
to exclude a certain plugin. (Note that this relies on the patch to allow
obtaining a PluginDatabase instance without loading all plugins). 

I am attaching a proposed patch to this report, which includes an abstract base
class PluginDatabaseDelegate. This class contains two methods to be implemented
in a subclass:
- bool shouldLoadPluginAtPath(const String&)
- bool shouldLoadPluginPackage(const PluginPackage*).
The methods are called in this order. If any of these returns false, the
loading of this particular plugin is aborted.

A delegate implementing this subclass could be set as shown below (here the
delegate is called myDelegate):
PluginDatabase* db = PluginDatabase::installedPlugins(false); // do not load
plugins just yet
db->setDelegate(myDelegate); // Set delegate
db->setPluginDirectories(PluginDatabase::defaultPluginDirectories());
db->refresh() // load plugins from standard directory now

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list