[wp-trac] [WordPress Trac] #39338: class-wp-hook.php - apply_filters() infinite loop

WordPress Trac noreply at wordpress.org
Tue Oct 24 07:27:06 UTC 2017


#39338: class-wp-hook.php - apply_filters() infinite loop
-------------------------------------------------+-------------------------
 Reporter:  frettled                             |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Plugins                              |  Release
 Severity:  normal                               |     Version:  4.7
 Keywords:  reporter-feedback needs-patch dev-   |  Resolution:
  feedback                                       |     Focuses:
-------------------------------------------------+-------------------------

Comment (by santrix):

 This code in class-wp-hook.php is a major issue

 {{{
 } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 }}}

 I work for a large host and several plugins can cause this to trap itself
 in an endless loop. The solution offered by frettled seems reasonable, and
 does prevent it. I might add that in configurations of Apache 2.4 where
 Mod Security is deployed, this kind of thing will also cause a memory leak
 leading to rapid destabilisation of a server (tested using fcgi, lsapi,
 suphp, cgi).

 This type of thing needs to be fixed sooner than later throughout the
 core.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39338#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list