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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 24 03:25:52 PDT 2009


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

           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 #38475|                            |review?
               Flag|                            |


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

(Note, this is a re-post as the original got lost in a bugzilla crash).

It is well-known that plugins can cause problems, in the worst case leading to
a crash. Unfortunately, this can happen as early as plugin-loading, as code may
be executed on the plugin during this stage. One way this can be worked around
is by using the recently introduced patch to change the plugin directory.
However, in some applications it may not be desirable to switch to a different
directory. Instead, a client may wish to filter the list of plugins to load.

Therefore I propose adding a client callback class (or delegate), which allows
filtering plugins based on its path or other attributes such as name, version,
etc. I have included a proposed patch that implements this functionality, by
introducing an abstract base class PluginDatabaseClient with two pure virtual
methods shouldLoadPluginAtPath() and shouldLoadPluginPackage(). These are
called in sequence, and if any of these return false, the current plugin is not
loaded. For instance, if shouldLoadPluginAtPath() returns false, no further
inspection of the plugin is performed. Such a client can be set (optionally) by
calling setClient() on the PluginDatabase singleton instance. Note, that the
instance must be created without populating as the following example shows
(where myPluginLoaderClient denote some PluginDatabaseClient implementation):

PluginDatabase* db = PluginDatabase::installedPlugins(false); // Do not load
plugins
db->setClient(myPluginLoaderClient);    // Set client instance
db->setPluginDirectories(PluginDatabase::defaultPluginDirectories());
db->refresh();    // Load plugins with client in place

-- 
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