aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 2024-11-01 23:22:22 +0100
committerGravatar GitHub <noreply@github.com> 2024-11-01 23:22:22 +0100
commitb7bff9484fe313e8503ed4effae839573b3a8539 (patch)
tree440bc71508c685309652d30baae194e4908edd66 /lib
parent5c2d2996f97664efe133ee809ef9349e6c859850 (diff)
Update phpmailer/phpmailer requirement from 6.9.1 to 6.9.2 in /lib (#6968)
* Update phpmailer/phpmailer requirement from 6.9.1 to 6.9.2 in /lib Updates the requirements on [phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer) to permit the latest version. - [Release notes](https://github.com/PHPMailer/PHPMailer/releases) - [Changelog](https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md) - [Commits](https://github.com/PHPMailer/PHPMailer/compare/v6.9.1...v6.9.2) --- updated-dependencies: - dependency-name: phpmailer/phpmailer dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Update library code --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'lib')
-rw-r--r--lib/composer.json2
-rw-r--r--lib/phpmailer/phpmailer/README.md12
-rw-r--r--lib/phpmailer/phpmailer/VERSION2
-rw-r--r--lib/phpmailer/phpmailer/src/Exception.php2
-rw-r--r--lib/phpmailer/phpmailer/src/PHPMailer.php48
-rw-r--r--lib/phpmailer/phpmailer/src/SMTP.php44
6 files changed, 59 insertions, 51 deletions
diff --git a/lib/composer.json b/lib/composer.json
index 92ae71805..ef96db612 100644
--- a/lib/composer.json
+++ b/lib/composer.json
@@ -17,7 +17,7 @@
"require": {
"marienfressinaud/lib_opml": "0.5.1",
"phpgt/cssxpath": "dev-master#45f3ac151fc21d459e2515c3aff97cd4bf877bf8",
- "phpmailer/phpmailer": "6.9.1",
+ "phpmailer/phpmailer": "6.9.2",
"simplepie/simplepie": "dev-freshrss#88f13f2df1ba17a7432a624d38884b1bd8f60e43"
},
"config": {
diff --git a/lib/phpmailer/phpmailer/README.md b/lib/phpmailer/phpmailer/README.md
index e3e4ecff3..8c2ec4543 100644
--- a/lib/phpmailer/phpmailer/README.md
+++ b/lib/phpmailer/phpmailer/README.md
@@ -41,13 +41,13 @@ you should look at before rolling your own. Try [SwiftMailer](https://swiftmaile
, [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail), etc.
## License
-This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution.
+This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution.
## Installation & loading
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
```json
-"phpmailer/phpmailer": "^6.9.1"
+"phpmailer/phpmailer": "^6.9.2"
```
or run
@@ -144,7 +144,7 @@ If you are re-using the instance (e.g. when sending to a mailing list), you may
That's it. You should now be ready to use PHPMailer!
## Localization
-PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder, you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
+PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder, you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
```php
//To load the French version
@@ -162,9 +162,9 @@ To reduce PHPMailer's deployed code footprint, examples are not included if you
Complete generated API documentation is [available online](https://phpmailer.github.io/PHPMailer/).
-You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailerTest.php) a good reference for how to do various operations such as encryption.
+You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](https://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailerTest.php) a good reference for how to do various operations such as encryption.
-If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
+If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](https://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
## Tests
[PHPMailer tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/) use PHPUnit 9, with [a polyfill](https://github.com/Yoast/PHPUnit-Polyfills) to let 9-style tests run on older PHPUnit and PHP versions.
@@ -213,7 +213,7 @@ use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-php
See [changelog](changelog.md).
## History
-- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/).
+- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](https://sourceforge.net/projects/phpmailer/).
- [Marcus Bointon](https://github.com/Synchro) (`coolbru` on SF) and Andy Prevost (`codeworxtech`) took over the project in 2004.
- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
- Marcus created [his fork on GitHub](https://github.com/Synchro/PHPMailer) in 2008.
diff --git a/lib/phpmailer/phpmailer/VERSION b/lib/phpmailer/phpmailer/VERSION
index dc3829f5e..6b9255cf0 100644
--- a/lib/phpmailer/phpmailer/VERSION
+++ b/lib/phpmailer/phpmailer/VERSION
@@ -1 +1 @@
-6.9.1
+6.9.2
diff --git a/lib/phpmailer/phpmailer/src/Exception.php b/lib/phpmailer/phpmailer/src/Exception.php
index 52eaf9515..09c1a2cfe 100644
--- a/lib/phpmailer/phpmailer/src/Exception.php
+++ b/lib/phpmailer/phpmailer/src/Exception.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/lib/phpmailer/phpmailer/src/PHPMailer.php b/lib/phpmailer/phpmailer/src/PHPMailer.php
index ba4bcd472..12da10354 100644
--- a/lib/phpmailer/phpmailer/src/PHPMailer.php
+++ b/lib/phpmailer/phpmailer/src/PHPMailer.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
@@ -152,8 +152,7 @@ class PHPMailer
* Only supported in simple alt or alt_inline message types
* To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator.
*
- * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/
- * @see http://kigkonsult.se/iCalcreator/
+ * @see https://kigkonsult.se/iCalcreator/
*
* @var string
*/
@@ -358,7 +357,7 @@ class PHPMailer
public $AuthType = '';
/**
- * SMTP SMTPXClient command attibutes
+ * SMTP SMTPXClient command attributes
*
* @var array
*/
@@ -468,7 +467,7 @@ class PHPMailer
* Only applicable when sending via SMTP.
*
* @see https://en.wikipedia.org/wiki/Variable_envelope_return_path
- * @see http://www.postfix.org/VERP_README.html Postfix VERP info
+ * @see https://www.postfix.org/VERP_README.html Postfix VERP info
*
* @var bool
*/
@@ -551,10 +550,10 @@ class PHPMailer
* The function that handles the result of the send email action.
* It is called out by send() for each email sent.
*
- * Value can be any php callable: http://www.php.net/is_callable
+ * Value can be any php callable: https://www.php.net/is_callable
*
* Parameters:
- * bool $result result of the send action
+ * bool $result result of the send action
* array $to email addresses of the recipients
* array $cc cc email addresses
* array $bcc bcc email addresses
@@ -757,7 +756,7 @@ class PHPMailer
*
* @var string
*/
- const VERSION = '6.9.1';
+ const VERSION = '6.9.2';
/**
* Error severity: message only, continue processing.
@@ -903,7 +902,7 @@ class PHPMailer
}
//Is this a PSR-3 logger?
if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) {
- $this->Debugoutput->debug($str);
+ $this->Debugoutput->debug(rtrim($str, "\r\n"));
return;
}
@@ -1072,7 +1071,7 @@ class PHPMailer
* be modified after calling this function), addition of such addresses is delayed until send().
* 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 $kind One of 'to', 'cc', 'bcc', or 'Reply-To'
* @param string $address The email address
* @param string $name An optional username associated with the address
*
@@ -1212,7 +1211,7 @@ class PHPMailer
* Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available.
* Note that quotes in the name part are removed.
*
- * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
+ * @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
*
* @param string $addrstr The address list string
* @param bool $useimap Whether to use the IMAP extension to parse the list
@@ -1407,7 +1406,6 @@ class PHPMailer
* * IPv6 literals: 'first.last@[IPv6:a1::]'
* Not all of these will necessarily work for sending!
*
- * @see http://squiloople.com/2009/12/20/email-address-validation/
* @copyright 2009-2010 Michael Rushton
* Feel free to use and redistribute this code. But please keep this copyright notice.
*/
@@ -1734,9 +1732,8 @@ class PHPMailer
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
//A space after `-f` is optional, but there is a long history of its presence
//causing problems, so we don't use one
- //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
- //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
- //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
+ //Exim docs: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
+ //Sendmail docs: https://www.sendmail.org/~ca/email/man/sendmail.html
//Example problem: https://www.drupal.org/node/1057954
//PHP 5.6 workaround
@@ -1901,7 +1898,7 @@ class PHPMailer
/**
* Send mail using the PHP mail() function.
*
- * @see http://www.php.net/manual/en/book.mail.php
+ * @see https://www.php.net/manual/en/book.mail.php
*
* @param string $header The message headers
* @param string $body The message body
@@ -1931,9 +1928,8 @@ class PHPMailer
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
//A space after `-f` is optional, but there is a long history of its presence
//causing problems, so we don't use one
- //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
- //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
- //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
+ //Exim docs: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
+ //Sendmail docs: https://www.sendmail.org/~ca/email/man/sendmail.html
//Example problem: https://www.drupal.org/node/1057954
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
@@ -3634,7 +3630,7 @@ class PHPMailer
* without breaking lines within a character.
* Adapted from a function by paravoid.
*
- * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
+ * @see https://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
*
* @param string $str multi-byte text to wrap encode
* @param string $linebreak string to use as linefeed/end-of-line
@@ -3690,7 +3686,7 @@ class PHPMailer
/**
* Encode a string using Q encoding.
*
- * @see http://tools.ietf.org/html/rfc2047#section-4.2
+ * @see https://www.rfc-editor.org/rfc/rfc2047#section-4.2
*
* @param string $str the text to encode
* @param string $position Where the text is going to be used, see the RFC for what that means
@@ -4228,7 +4224,7 @@ class PHPMailer
$result = $_SERVER['SERVER_NAME'];
} elseif (function_exists('gethostname') && gethostname() !== false) {
$result = gethostname();
- } elseif (php_uname('n') !== false) {
+ } elseif (php_uname('n') !== '') {
$result = php_uname('n');
}
if (!static::isValidHost($result)) {
@@ -4253,7 +4249,7 @@ class PHPMailer
empty($host)
|| !is_string($host)
|| strlen($host) > 256
- || !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+\])$/', $host)
+ || !preg_match('/^([a-z\d.-]*|\[[a-f\d:]+\])$/i', $host)
) {
return false;
}
@@ -4267,8 +4263,8 @@ class PHPMailer
//Is it a valid IPv4 address?
return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
}
- //Is it a syntactically valid hostname (when embeded in a URL)?
- return filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false;
+ //Is it a syntactically valid hostname (when embedded in a URL)?
+ return filter_var('https://' . $host, FILTER_VALIDATE_URL) !== false;
}
/**
@@ -4679,7 +4675,7 @@ class PHPMailer
* Multi-byte-safe pathinfo replacement.
* Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe.
*
- * @see http://www.php.net/manual/en/function.pathinfo.php#107461
+ * @see https://www.php.net/manual/en/function.pathinfo.php#107461
*
* @param string $path A filename or path, does not need to exist as a file
* @param int|string $options Either a PATHINFO_* constant,
diff --git a/lib/phpmailer/phpmailer/src/SMTP.php b/lib/phpmailer/phpmailer/src/SMTP.php
index 1b5b00771..5b238b527 100644
--- a/lib/phpmailer/phpmailer/src/SMTP.php
+++ b/lib/phpmailer/phpmailer/src/SMTP.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
@@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
- const VERSION = '6.9.1';
+ const VERSION = '6.9.2';
/**
* SMTP line break constant.
@@ -152,8 +152,8 @@ class SMTP
/**
* Whether to use VERP.
*
- * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path
- * @see http://www.postfix.org/VERP_README.html Info on VERP
+ * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path
+ * @see https://www.postfix.org/VERP_README.html Info on VERP
*
* @var bool
*/
@@ -164,7 +164,7 @@ class SMTP
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2.
* This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure.
*
- * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2
+ * @see https://www.rfc-editor.org/rfc/rfc2821#section-4.5.3.2
*
* @var int
*/
@@ -187,12 +187,12 @@ class SMTP
*/
protected $smtp_transaction_id_patterns = [
'exim' => '/[\d]{3} OK id=(.*)/',
- 'sendmail' => '/[\d]{3} 2.0.0 (.*) Message/',
- 'postfix' => '/[\d]{3} 2.0.0 Ok: queued as (.*)/',
- 'Microsoft_ESMTP' => '/[0-9]{3} 2.[\d].0 (.*)@(?:.*) Queued mail for delivery/',
+ 'sendmail' => '/[\d]{3} 2\.0\.0 (.*) Message/',
+ 'postfix' => '/[\d]{3} 2\.0\.0 Ok: queued as (.*)/',
+ 'Microsoft_ESMTP' => '/[0-9]{3} 2\.[\d]\.0 (.*)@(?:.*) Queued mail for delivery/',
'Amazon_SES' => '/[\d]{3} Ok (.*)/',
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
- 'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
+ 'CampaignMonitor' => '/[\d]{3} 2\.0\.0 OK:([a-zA-Z\d]{48})/',
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
'ZoneMTA' => '/[\d]{3} Message queued as (.*)/',
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
@@ -280,7 +280,8 @@ class SMTP
}
//Is this a PSR-3 logger?
if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) {
- $this->Debugoutput->debug($str);
+ //Remove trailing line breaks potentially added by calls to SMTP::client_send()
+ $this->Debugoutput->debug(rtrim($str, "\r\n"));
return;
}
@@ -293,6 +294,7 @@ class SMTP
switch ($this->Debugoutput) {
case 'error_log':
//Don't output, just log
+ /** @noinspection ForgottenDebugOutputInspection */
error_log($str);
break;
case 'html':
@@ -404,7 +406,9 @@ class SMTP
$errstr = '';
if ($streamok) {
$socket_context = stream_context_create($options);
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$connection = stream_socket_client(
$host . ':' . $port,
$errno,
@@ -419,7 +423,9 @@ class SMTP
'Connection: stream_socket_client not available, falling back to fsockopen',
self::DEBUG_CONNECTION
);
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$connection = fsockopen(
$host,
$port,
@@ -483,7 +489,9 @@ class SMTP
}
//Begin encrypted connection
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$crypto_ok = stream_socket_enable_crypto(
$this->smtp_conn,
true,
@@ -648,7 +656,7 @@ class SMTP
}
//The following borrowed from
- //http://php.net/manual/en/function.mhash.php#27225
+ //https://www.php.net/manual/en/function.mhash.php#27225
//RFC 2104 HMAC implementation for php.
//Creates an md5 HMAC.
@@ -1162,7 +1170,9 @@ class SMTP
} else {
$this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT);
}
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$result = fwrite($this->smtp_conn, $data);
restore_error_handler();
@@ -1265,7 +1275,9 @@ class SMTP
while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
//Must pass vars in here as params are by reference
//solution for signals inspired by https://github.com/symfony/symfony/pull/6540
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$n = stream_select($selR, $selW, $selW, $this->Timelimit);
restore_error_handler();