[wp-trac] [WordPress Trac] #44532: Extreme memory leak related to wp_is_stream in wp-includes/functions.php in WordPress 4.9.7

WordPress Trac noreply at wordpress.org
Fri Jul 13 01:41:07 UTC 2018


#44532: Extreme memory leak related to wp_is_stream in wp-includes/functions.php in
WordPress 4.9.7
--------------------------+---------------------
 Reporter:  timbowesohft  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  high          |   Milestone:  4.9.8
Component:  Media         |     Version:  4.9.7
 Severity:  major         |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by dd32):

 As a possible work-around for now, we could skip calling
 `stream_get_wrappers()` in `wp_is_stream()` when possible - For most
 users, where streams aren't actually used, it'll avoid this issue for the
 majority of users.

 Something like:
 {{{
 function wp_is_stream( $stream )
    if  $stream does not contain '://':
       return $stream cannot be a Stream.
    endif

    $wrappers = stream_get_wrappers();
    ... All existing logic, probably with r42432 backported.
 }}}

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


More information about the wp-trac mailing list