Make WordPress Core

Changeset 23609


Ignore:
Timestamp:
03/04/2013 05:40:43 AM (13 years ago)
Author:
dd32
Message:

WP_HTTP: Prevent the 'max_body_length' and 'stream_handle' properties of the curl class from leaking between requests by specifically initializing them in every case. See #23472 & r23605

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-http.php

    r23608 r23609  
    11761176        if ( isset( $r['limit-response-size'] ) )
    11771177            $this->max_body_length = intval( $r['limit-response-size'] );
     1178        else
     1179            $this->max_body_length = false;
    11781180
    11791181        // If streaming to a file open a file handle, and setup our curl streaming handler
     
    11851187            if ( ! $this->stream_handle )
    11861188                return new WP_Error( 'http_request_failed', sprintf( __( 'Could not open handle for fopen() to %s' ), $r['filename'] ) );
     1189        } else {
     1190            $this->stream_handle = false;
    11871191        }
    11881192
Note: See TracChangeset for help on using the changeset viewer.