Make WordPress Core

Changeset 50800


Ignore:
Timestamp:
04/29/2021 08:31:13 PM (3 years ago)
Author:
SergeyBiryukov
Message:

External Libraries: Upgrade PHPMailer to version 6.4.1.

Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.4.1

For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.4.0...v6.4.1

Props ayeshrajans.
Merges [50799] to the 5.7 branch.
Fixes #53114.

Location:
branches/5.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/5.7

  • branches/5.7/src/wp-includes/PHPMailer/PHPMailer.php

    r50630 r50800  
    749749     * @var string
    750750     */
    751     const VERSION = '6.4.0';
     751    const VERSION = '6.4.1';
    752752
    753753    /**
     
    17241724                fwrite($mail, $body);
    17251725                $result = pclose($mail);
     1726                $addrinfo = static::parseAddresses($toAddr);
    17261727                $this->doCallback(
    17271728                    ($result === 0),
    1728                     [$toAddr],
     1729                    [[$addrinfo['address'], $addrinfo['name']]],
    17291730                    $this->cc,
    17301731                    $this->bcc,
     
    18131814    protected static function isPermittedPath($path)
    18141815    {
    1815         return !preg_match('#^[a-z]+://#i', $path);
     1816        //Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1
     1817        return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path);
    18161818    }
    18171819
     
    18251827    protected static function fileIsAccessible($path)
    18261828    {
     1829        if (!static::isPermittedPath($path)) {
     1830            return false;
     1831        }
    18271832        $readable = file_exists($path);
    18281833        //If not a UNC path (expected to start with \\), check read permission, see #2069
     
    18301835            $readable = $readable && is_readable($path);
    18311836        }
    1832         return static::isPermittedPath($path) && $readable;
     1837        return $readable;
    18331838    }
    18341839
     
    18791884            foreach ($toArr as $toAddr) {
    18801885                $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
    1881                 $this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []);
     1886                $addrinfo = static::parseAddresses($toAddr);
     1887                $this->doCallback(
     1888                    $result,
     1889                    [[$addrinfo['address'], $addrinfo['name']]],
     1890                    $this->cc,
     1891                    $this->bcc,
     1892                    $this->Subject,
     1893                    $body,
     1894                    $this->From,
     1895                    []
     1896                );
    18821897            }
    18831898        } else {
     
    19681983                }
    19691984
    1970                 $callbacks[] = ['issent' => $isSent, 'to' => $to[0]];
     1985                $callbacks[] = ['issent' => $isSent, 'to' => $to[0], 'name' => $to[1]];
    19711986            }
    19721987        }
     
    19892004            $this->doCallback(
    19902005                $cb['issent'],
    1991                 [$cb['to']],
     2006                [[$cb['to'], $cb['name']]],
    19922007                [],
    19932008                [],
  • branches/5.7/src/wp-includes/PHPMailer/SMTP.php

    r50630 r50800  
    3636     * @var string
    3737     */
    38     const VERSION = '6.4.0';
     38    const VERSION = '6.4.1';
    3939
    4040    /**
Note: See TracChangeset for help on using the changeset viewer.