Make WordPress Core

Ticket #51521: 51521.diff

File 51521.diff, 3.8 KB (added by desrosj, 4 years ago)
  • src/wp-includes/SimplePie/Content/Type/Sniffer.php

     
    150150                }
    151151                elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body))
    152152                {
    153                         return 'application/octect-stream';
     153                        return 'application/octet-stream';
    154154                }
    155155
    156156                return 'text/plain';
  • src/wp-includes/SimplePie/File.php

     
    109109                                curl_setopt($fp, CURLOPT_REFERER, $url);
    110110                                curl_setopt($fp, CURLOPT_USERAGENT, $useragent);
    111111                                curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2);
    112                                 if (!ini_get('open_basedir') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>='))
    113                                 {
    114                                         curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1);
    115                                         curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects);
    116                                 }
    117112                                foreach ($curl_options as $curl_param => $curl_value) {
    118113                                        curl_setopt($fp, $curl_param, $curl_value);
    119114                                }
     
    148143                                                        $this->redirects++;
    149144                                                        $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
    150145                                                        $previousStatusCode = $this->status_code;
    151                                                         $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen);
     146                                                        $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options);
    152147                                                        $this->permanent_url = ($previousStatusCode == 301) ? $location : $url;
    153148                                                        return;
    154149                                                }
     
    233228                                                                $this->redirects++;
    234229                                                                $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url);
    235230                                                                $previousStatusCode = $this->status_code;
    236                                                                 $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen);
     231                                                                $this->__construct($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen, $curl_options);
    237232                                                                $this->permanent_url = ($previousStatusCode == 301) ? $location : $url;
    238233                                                                return;
    239234                                                        }
  • src/wp-includes/SimplePie/Locator.php

     
    9494                $this->registry = $registry;
    9595        }
    9696
    97         public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working)
     97        public function find($type = SIMPLEPIE_LOCATOR_ALL, &$working = null)
    9898        {
    9999                if ($this->is_feed($this->file))
    100100                {
  • src/wp-includes/SimplePie/Misc.php

     
    364364                }
    365365
    366366                // Check that the encoding is supported
    367                 if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80")
     367                if (!in_array($input, mb_list_encodings()))
    368368                {
    369369                        return false;
    370370                }
    371                 if (!in_array($input, mb_list_encodings()))
     371
     372                if (@mb_convert_encoding("\x80", 'UTF-16BE', $input) === "\x00\x80")
    372373                {
    373374                        return false;
    374375                }
  • src/wp-includes/class-simplepie.php

     
    6868 * POSSIBILITY OF SUCH DAMAGE.
    6969 *
    7070 * @package SimplePie
    71  * @version 1.5.5
     71 * @version 1.5.6
    7272 * @copyright 2004-2017 Ryan Parman, Sam Sneddon, Ryan McCue
    7373 * @author Ryan Parman
    7474 * @author Sam Sneddon
     
    8585/**
    8686 * SimplePie Version
    8787 */
    88 define('SIMPLEPIE_VERSION', '1.5.5');
     88define('SIMPLEPIE_VERSION', '1.5.6');
    8989
    9090/**
    9191 * SimplePie Build