External Libraries: Upgrade PHPMailer to version 6.6.2.

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

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

Props ayeshrajans, jrf.
Fixes #55976.

git-svn-id: https://develop.svn.wordpress.org/trunk@53500 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2022-06-14 14:36:29 +00:00
parent c2de42b9ad
commit d60f4f9cab
2 changed files with 19 additions and 8 deletions

View File

@ -750,7 +750,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.6.0';
const VERSION = '6.6.2';
/**
* Error severity: message only, continue processing.
@ -1066,8 +1066,8 @@ class PHPMailer
* Addresses that have been added already return false, but do not throw exceptions.
*
* @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'
* @param string $address The email address to send, resp. to reply to
* @param string $name
* @param string $address The email address
* @param string $name An optional username associated with the address
*
* @throws Exception
*
@ -1075,9 +1075,11 @@ class PHPMailer
*/
protected function addOrEnqueueAnAddress($kind, $address, $name)
{
$address = trim($address);
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
$pos = strrpos($address, '@');
$pos = false;
if ($address !== null) {
$address = trim($address);
$pos = strrpos($address, '@');
}
if (false === $pos) {
//At-sign is missing.
$error_message = sprintf(
@ -1094,8 +1096,14 @@ class PHPMailer
return false;
}
if ($name !== null) {
$name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
} else {
$name = '';
}
$params = [$kind, $address, $name];
//Enqueue addresses with IDN until we know the PHPMailer::$CharSet.
//Domain is assumed to be whatever is after the last @ symbol in the address
if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) {
if ('Reply-To' !== $kind) {
if (!array_key_exists($address, $this->RecipientsQueue)) {

View File

@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.6.0';
const VERSION = '6.6.2';
/**
* SMTP line break constant.
@ -1037,7 +1037,10 @@ class SMTP
return false;
}
$this->setError('');
//Don't clear the error store when using keepalive
if ($command !== 'RSET') {
$this->setError('');
}
return true;
}