Make WordPress Core

Changeset 53535


Ignore:
Timestamp:
06/20/2022 03:02:32 PM (22 months ago)
Author:
SergeyBiryukov
Message:

External Libraries: Upgrade PHPMailer to version 6.6.3.

This is a maintenance release with minor CS improvements.

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

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

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500].

Props jrf, Synchro.
Fixes #56016.

Location:
trunk/src/wp-includes/PHPMailer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/PHPMailer/PHPMailer.php

    r53500 r53535  
    751751     * @var string
    752752     */
    753     const VERSION = '6.6.2';
     753    const VERSION = '6.6.3';
    754754
    755755    /**
     
    15581558            //Validate From, Sender, and ConfirmReadingTo addresses
    15591559            foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
    1560                 $this->$address_kind = trim($this->$address_kind);
    1561                 if (empty($this->$address_kind)) {
     1560                $this->{$address_kind} = trim($this->{$address_kind});
     1561                if (empty($this->{$address_kind})) {
    15621562                    continue;
    15631563                }
    1564                 $this->$address_kind = $this->punyencodeAddress($this->$address_kind);
    1565                 if (!static::validateAddress($this->$address_kind)) {
     1564                $this->{$address_kind} = $this->punyencodeAddress($this->{$address_kind});
     1565                if (!static::validateAddress($this->{$address_kind})) {
    15661566                    $error_message = sprintf(
    15671567                        '%s (%s): %s',
    15681568                        $this->lang('invalid_address'),
    15691569                        $address_kind,
    1570                         $this->$address_kind
     1570                        $this->{$address_kind}
    15711571                    );
    15721572                    $this->setError($error_message);
     
    16681668                    $sendMethod = $this->Mailer . 'Send';
    16691669                    if (method_exists($this, $sendMethod)) {
    1670                         return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
     1670                        return $this->{$sendMethod}($this->MIMEHeader, $this->MIMEBody);
    16711671                    }
    16721672
     
    22032203        if ($this->exceptions && null !== $lastexception) {
    22042204            throw $lastexception;
    2205         } elseif ($this->exceptions) {
     2205        }
     2206        if ($this->exceptions) {
    22062207            // no exception was thrown, likely $this->smtp->connect() failed
    22072208            $message = $this->getSmtpErrorMessage('connect_host');
     
    37163717     * displayed inline with the message, not just attached for download.
    37173718     * This is used in HTML messages that embed the images
    3718      * the HTML refers to using the $cid value.
     3719     * the HTML refers to using the `$cid` value in `img` tags, for example `<img src="cid:mylogo">`.
    37193720     * Never use a user-supplied path to a file!
    37203721     *
     
    37223723     * @param string $cid         Content ID of the attachment; Use this to reference
    37233724     *                            the content when using an embedded image in HTML
    3724      * @param string $name        Overrides the attachment name
    3725      * @param string $encoding    File encoding (see $Encoding)
    3726      * @param string $type        File MIME type
    3727      * @param string $disposition Disposition to use
    3728      *
     3725     * @param string $name        Overrides the attachment filename
     3726     * @param string $encoding    File encoding (see $Encoding) defaults to `base64`
     3727     * @param string $type        File MIME type (by default mapped from the `$path` filename's extension)
     3728     * @param string $disposition Disposition to use: `inline` (default) or `attachment`
     3729     *                            (unlikely you want this – {@see `addAttachment()`} instead)
     3730     *
     3731     * @return bool True on successfully adding an attachment
    37293732     * @throws Exception
    37303733     *
    3731      * @return bool True on successfully adding an attachment
    37323734     */
    37333735    public function addEmbeddedImage(
     
    41074109            return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
    41084110        }
    4109         if (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false) {
    4110             //Is it a syntactically valid hostname?
    4111             return true;
    4112         }
    4113 
    4114         return false;
     4111        //Is it a syntactically valid hostname (when embeded in a URL)?
     4112        return filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false;
    41154113    }
    41164114
     
    45824580    {
    45834581        if (property_exists($this, $name)) {
    4584             $this->$name = $value;
     4582            $this->{$name} = $value;
    45854583
    45864584            return true;
  • trunk/src/wp-includes/PHPMailer/SMTP.php

    r53500 r53535  
    3636     * @var string
    3737     */
    38     const VERSION = '6.6.2';
     38    const VERSION = '6.6.3';
    3939
    4040    /**
Note: See TracChangeset for help on using the changeset viewer.