Changes to a plugin interface might cause recursion

Bug #161281 reported by Sidnei da Silva
2
Affects Status Importance Assigned to Milestone
Zope PAS
Fix Released
Medium
Unassigned

Bug Description

If a plugin declared and was activated for a specific interface, and then suddenly stops providing that interface and removes the method from its implementation, PAS might end up acquiring the method from itself and recursing.

An example:

  - LDAPMultiPlugins used to provide and implement ICredentialsUpdate

  - An instance of LDAPMultiPlugins exists inside the database, activated to ICredentialsUpdate

  - LDAPMultiPlugins then removed the updateCredentials method and stopped declaring the ICredentialsUpdate interface.

  - Existing sites get a recursion error on login, because PAS tries to call <ldapmultiplugin-object>.updateCredentials(), but the method is acquired from PAS.

A proposed fix is attached, just checks that the object actually provides the interface it's declared for when doing listPlugins.

Revision history for this message
Sidnei da Silva (sidnei) wrote :
Revision history for this message
Sidnei da Silva (sidnei) wrote :

FWIW, the patch is for PluginRegistry.

Revision history for this message
Tres Seaver (tseaver) wrote :

Status: Pending => Resolved

Thanks for the patch! Checked in, with a test, on the trunk:

  http://svn.zope.org/PluginRegistry/trunk/?view=rev&rev=74716

and will be in the upcoming 1.1.2 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.