Преглед изворни кода

Fixes ZF-8225 & ZF-8299: A usage of class_exists when loading plugins in Zend_App does not check if the plugin class
is a valid implementation of Zend_Application_Resource_Resource.


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24393 44c647ce-9c0f-0410-b52a-842ac1e357ba

padraic пре 14 година
родитељ
комит
50b916f2ba
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      library/Zend/Application/Bootstrap/BootstrapAbstract.php

+ 3 - 1
library/Zend/Application/Bootstrap/BootstrapAbstract.php

@@ -352,7 +352,9 @@ abstract class Zend_Application_Bootstrap_BootstrapAbstract
                 continue;
             }
 
-            if (class_exists($plugin)) { //@SEE ZF-7550
+            if (class_exists($plugin)
+            && is_subclass_of($plugin, 'Zend_Application_Resource_Resource')
+            ) { //@SEE ZF-7550
                 $spec = (array) $spec;
                 $spec['bootstrap'] = $this;
                 $instance = new $plugin($spec);