1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-16 20:28:28 +01:00

Upgraded intervention/image (2.7.0 => 2.7.1)

Upgraded phpmailer/phpmailer (v6.5.3 => v6.6.0)
This commit is contained in:
Cameron 2022-03-06 14:25:23 -08:00
parent bdbc7e0dae
commit ce489e5b0f
14 changed files with 158 additions and 76 deletions

36
composer.lock generated
View File

@ -42,12 +42,12 @@
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
],
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@ -239,16 +239,16 @@
},
{
"name": "intervention/image",
"version": "2.7.0",
"version": "2.7.1",
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
"reference": "9a8cc99d30415ec0b3f7649e1647d03a55698545"
"reference": "744ebba495319501b873a4e48787759c72e3fb8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Intervention/image/zipball/9a8cc99d30415ec0b3f7649e1647d03a55698545",
"reference": "9a8cc99d30415ec0b3f7649e1647d03a55698545",
"url": "https://api.github.com/repos/Intervention/image/zipball/744ebba495319501b873a4e48787759c72e3fb8c",
"reference": "744ebba495319501b873a4e48787759c72e3fb8c",
"shasum": ""
},
"require": {
@ -307,7 +307,7 @@
],
"support": {
"issues": "https://github.com/Intervention/image/issues",
"source": "https://github.com/Intervention/image/tree/2.7.0"
"source": "https://github.com/Intervention/image/tree/2.7.1"
},
"funding": [
{
@ -319,7 +319,7 @@
"type": "github"
}
],
"time": "2021-10-03T14:17:12+00:00"
"time": "2021-12-16T16:49:26+00:00"
},
{
"name": "matthiasmullie/minify",
@ -454,16 +454,16 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v6.5.3",
"version": "v6.6.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71"
"reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71",
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"shasum": ""
},
"require": {
@ -476,10 +476,10 @@
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"doctrine/annotations": "^1.2",
"php-parallel-lint/php-console-highlighter": "^0.5.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
"phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.6.0",
"squizlabs/php_codesniffer": "^3.6.2",
"yoast/phpunit-polyfills": "^1.0.0"
},
"suggest": {
@ -520,7 +520,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3"
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0"
},
"funding": [
{
@ -528,7 +528,7 @@
"type": "github"
}
],
"time": "2021-11-25T16:34:11+00:00"
"time": "2022-02-28T15:31:21+00:00"
},
{
"name": "psr/http-message",

View File

@ -29,7 +29,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => '577bcb89e150c75f18cd0d18df82c0a4bc47a24f',
'reference' => 'bdbc7e0daed1670296220ee5354266a41a0062cb',
'name' => 'e107inc/e107',
),
'versions' =>
@ -41,7 +41,7 @@ private static $installed = array (
'aliases' =>
array (
),
'reference' => '577bcb89e150c75f18cd0d18df82c0a4bc47a24f',
'reference' => 'bdbc7e0daed1670296220ee5354266a41a0062cb',
),
'guzzlehttp/psr7' =>
array (
@ -72,12 +72,12 @@ private static $installed = array (
),
'intervention/image' =>
array (
'pretty_version' => '2.7.0',
'version' => '2.7.0.0',
'pretty_version' => '2.7.1',
'version' => '2.7.1.0',
'aliases' =>
array (
),
'reference' => '9a8cc99d30415ec0b3f7649e1647d03a55698545',
'reference' => '744ebba495319501b873a4e48787759c72e3fb8c',
),
'matthiasmullie/minify' =>
array (
@ -99,12 +99,12 @@ private static $installed = array (
),
'phpmailer/phpmailer' =>
array (
'pretty_version' => 'v6.5.3',
'version' => '6.5.3.0',
'pretty_version' => 'v6.6.0',
'version' => '6.6.0.0',
'aliases' =>
array (
),
'reference' => 'baeb7cde6b60b1286912690ab0693c7789a31e71',
'reference' => 'e43bac82edc26ca04b36143a48bde1c051cfd5b1',
),
'psr/http-message' =>
array (

View File

@ -238,17 +238,17 @@
},
{
"name": "intervention/image",
"version": "2.7.0",
"version_normalized": "2.7.0.0",
"version": "2.7.1",
"version_normalized": "2.7.1.0",
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
"reference": "9a8cc99d30415ec0b3f7649e1647d03a55698545"
"reference": "744ebba495319501b873a4e48787759c72e3fb8c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Intervention/image/zipball/9a8cc99d30415ec0b3f7649e1647d03a55698545",
"reference": "9a8cc99d30415ec0b3f7649e1647d03a55698545",
"url": "https://api.github.com/repos/Intervention/image/zipball/744ebba495319501b873a4e48787759c72e3fb8c",
"reference": "744ebba495319501b873a4e48787759c72e3fb8c",
"shasum": ""
},
"require": {
@ -265,7 +265,7 @@
"ext-imagick": "to use Imagick based image processing.",
"intervention/imagecache": "Caching extension for the Intervention Image library"
},
"time": "2021-10-03T14:17:12+00:00",
"time": "2021-12-16T16:49:26+00:00",
"type": "library",
"extra": {
"branch-alias": {
@ -309,7 +309,7 @@
],
"support": {
"issues": "https://github.com/Intervention/image/issues",
"source": "https://github.com/Intervention/image/tree/2.7.0"
"source": "https://github.com/Intervention/image/tree/2.7.1"
},
"funding": [
{
@ -462,17 +462,17 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v6.5.3",
"version_normalized": "6.5.3.0",
"version": "v6.6.0",
"version_normalized": "6.6.0.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71"
"reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71",
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"reference": "e43bac82edc26ca04b36143a48bde1c051cfd5b1",
"shasum": ""
},
"require": {
@ -485,10 +485,10 @@
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"doctrine/annotations": "^1.2",
"php-parallel-lint/php-console-highlighter": "^0.5.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
"phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.6.0",
"squizlabs/php_codesniffer": "^3.6.2",
"yoast/phpunit-polyfills": "^1.0.0"
},
"suggest": {
@ -499,7 +499,7 @@
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
},
"time": "2021-11-25T16:34:11+00:00",
"time": "2022-02-28T15:31:21+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -531,7 +531,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3"
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.6.0"
},
"funding": [
{

View File

@ -6,7 +6,7 @@
'aliases' =>
array (
),
'reference' => '577bcb89e150c75f18cd0d18df82c0a4bc47a24f',
'reference' => 'bdbc7e0daed1670296220ee5354266a41a0062cb',
'name' => 'e107inc/e107',
),
'versions' =>
@ -18,7 +18,7 @@
'aliases' =>
array (
),
'reference' => '577bcb89e150c75f18cd0d18df82c0a4bc47a24f',
'reference' => 'bdbc7e0daed1670296220ee5354266a41a0062cb',
),
'guzzlehttp/psr7' =>
array (
@ -49,12 +49,12 @@
),
'intervention/image' =>
array (
'pretty_version' => '2.7.0',
'version' => '2.7.0.0',
'pretty_version' => '2.7.1',
'version' => '2.7.1.0',
'aliases' =>
array (
),
'reference' => '9a8cc99d30415ec0b3f7649e1647d03a55698545',
'reference' => '744ebba495319501b873a4e48787759c72e3fb8c',
),
'matthiasmullie/minify' =>
array (
@ -76,12 +76,12 @@
),
'phpmailer/phpmailer' =>
array (
'pretty_version' => 'v6.5.3',
'version' => '6.5.3.0',
'pretty_version' => 'v6.6.0',
'version' => '6.6.0.0',
'aliases' =>
array (
),
'reference' => 'baeb7cde6b60b1286912690ab0693c7789a31e71',
'reference' => 'e43bac82edc26ca04b36143a48bde1c051cfd5b1',
),
'psr/http-message' =>
array (

View File

@ -131,6 +131,7 @@ abstract class AbstractEncoder
case 'jpg':
case 'jpeg':
case 'jfif':
case 'image/jp2':
case 'image/jpg':
case 'image/jpeg':

View File

@ -62,7 +62,7 @@ class Response
} elseif (class_exists('\Symfony\Component\HttpFoundation\Response')) {
$response = SymfonyResponse::create($data);
$response = new SymfonyResponse($data);
$response->headers->set('Content-Type', $mime);
$response->headers->set('Content-Length', $length);

View File

@ -1 +1 @@
6.5.3
6.6.0

View File

@ -25,6 +25,11 @@
"type": "github"
}
],
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require": {
"php": ">=5.5.0",
"ext-ctype": "*",
@ -35,10 +40,10 @@
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"doctrine/annotations": "^1.2",
"php-parallel-lint/php-console-highlighter": "^0.5.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
"phpcompatibility/php-compatibility": "^9.3.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.6.0",
"squizlabs/php_codesniffer": "^3.6.2",
"yoast/phpunit-polyfills": "^1.0.0"
},
"suggest": {

View File

@ -10,7 +10,7 @@
*/
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP: échec de lauthentification.';
$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectée par un bogue qui peut entraîner des messages corrompus. Pour résoudre ce problème, passez à lenvoi par SMTP, désactivez loption mail.add_x_header dans le fichier php.ini, passez à MacOS ou Linux, ou passez PHP à la version 7.0.17+ ou 7.1.3+.';
$PHPMAILER_LANG['buggy_php'] = 'Votre version de PHP est affectée par un bug qui peut entraîner des messages corrompus. Pour résoudre ce problème, passez à lenvoi par SMTP, désactivez loption mail.add_x_header dans le fichier php.ini, passez à MacOS ou Linux, ou passez PHP à la version 7.0.17+ ou 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Erreur SMTP: impossible de se connecter au serveur SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Erreur SMTP: données incorrectes.';
$PHPMAILER_LANG['empty_message'] = 'Corps du message vide.';

View File

@ -33,7 +33,7 @@ use League\OAuth2\Client\Token\AccessToken;
*
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
*/
class OAuth
class OAuth implements OAuthTokenProvider
{
/**
* An instance of the League OAuth Client Provider.

View File

@ -0,0 +1,44 @@
<?php
/**
* PHPMailer - PHP email creation and transport class.
* PHP Version 5.5.
*
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
*
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
* @author Brent R. Matzelle (original founder)
* @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
* @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.
*/
namespace PHPMailer\PHPMailer;
/**
* OAuthTokenProvider - OAuth2 token provider interface.
* Provides base64 encoded OAuth2 auth strings for SMTP authentication.
*
* @see OAuth
* @see SMTP::authenticate()
*
* @author Peter Scopes (pdscopes)
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
*/
interface OAuthTokenProvider
{
/**
* Generate a base64-encoded OAuth token ensuring that the access token has not expired.
* The string to be base 64 encoded should be in the form:
* "user=<user_email_address>\001auth=Bearer <access_token>\001\001"
*
* @return string
*/
public function getOauth64();
}

View File

@ -358,9 +358,9 @@ class PHPMailer
public $AuthType = '';
/**
* An instance of the PHPMailer OAuth class.
* An implementation of the PHPMailer OAuthTokenProvider interface.
*
* @var OAuth
* @var OAuthTokenProvider
*/
protected $oauth;
@ -750,7 +750,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.5.3';
const VERSION = '6.6.0';
/**
* Error severity: message only, continue processing.
@ -1185,6 +1185,7 @@ class PHPMailer
*
* @param string $addrstr The address list string
* @param bool $useimap Whether to use the IMAP extension to parse the list
* @param string $charset The charset to use when decoding the address list string.
*
* @return array
*/
@ -1742,7 +1743,7 @@ class PHPMailer
fwrite($mail, $header);
fwrite($mail, $body);
$result = pclose($mail);
$addrinfo = static::parseAddresses($toAddr, true, $this->charSet);
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
$this->doCallback(
($result === 0),
[[$addrinfo['address'], $addrinfo['name']]],
@ -1797,7 +1798,13 @@ class PHPMailer
*/
protected static function isShellSafe($string)
{
//Future-proof
//It's not possible to use shell commands safely (which includes the mail() function) without escapeshellarg,
//but some hosting providers disable it, creating a security problem that we don't want to have to deal with,
//so we don't.
if (!function_exists('escapeshellarg') || !function_exists('escapeshellcmd')) {
return false;
}
if (
escapeshellcmd($string) !== $string
|| !in_array(escapeshellarg($string), ["'$string'", "\"$string\""])
@ -1905,7 +1912,7 @@ class PHPMailer
if ($this->SingleTo && count($toArr) > 1) {
foreach ($toArr as $toAddr) {
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
$addrinfo = static::parseAddresses($toAddr, true, $this->charSet);
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
$this->doCallback(
$result,
[[$addrinfo['address'], $addrinfo['name']]],
@ -2154,7 +2161,8 @@ class PHPMailer
}
if ($tls) {
if (!$this->smtp->startTLS()) {
throw new Exception($this->lang('connect_host'));
$message = $this->getSmtpErrorMessage('connect_host');
throw new Exception($message);
}
//We must resend EHLO after TLS negotiation
$this->smtp->hello($hello);
@ -2184,6 +2192,10 @@ class PHPMailer
//As we've caught all exceptions, just report whatever the last one was
if ($this->exceptions && null !== $lastexception) {
throw $lastexception;
} elseif ($this->exceptions) {
// no exception was thrown, likely $this->smtp->connect() failed
$message = $this->getSmtpErrorMessage('connect_host');
throw new Exception($message);
}
return false;
@ -2630,16 +2642,15 @@ class PHPMailer
$result .= $this->headerLine('X-Priority', $this->Priority);
}
if ('' === $this->XMailer) {
//Empty string for default X-Mailer header
$result .= $this->headerLine(
'X-Mailer',
'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)'
);
} else {
$myXmailer = trim($this->XMailer);
if ($myXmailer) {
$result .= $this->headerLine('X-Mailer', $myXmailer);
}
}
} elseif (is_string($this->XMailer) && trim($this->XMailer) !== '') {
//Some string
$result .= $this->headerLine('X-Mailer', trim($this->XMailer));
} //Other values result in no X-Mailer header
if ('' !== $this->ConfirmReadingTo) {
$result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>');
@ -4121,6 +4132,26 @@ class PHPMailer
return $key;
}
/**
* Build an error message starting with a generic one and adding details if possible.
*
* @param string $base_key
* @return string
*/
private function getSmtpErrorMessage($base_key)
{
$message = $this->lang($base_key);
$error = $this->smtp->getError();
if (!empty($error['error'])) {
$message .= ' ' . $error['error'];
if (!empty($error['detail'])) {
$message .= ' ' . $error['detail'];
}
}
return $message;
}
/**
* Check if an error occurred.
*
@ -5021,9 +5052,9 @@ class PHPMailer
}
/**
* Get the OAuth instance.
* Get the OAuthTokenProvider instance.
*
* @return OAuth
* @return OAuthTokenProvider
*/
public function getOAuth()
{
@ -5031,9 +5062,9 @@ class PHPMailer
}
/**
* Set an OAuth instance.
* Set an OAuthTokenProvider instance.
*/
public function setOAuth(OAuth $oauth)
public function setOAuth(OAuthTokenProvider $oauth)
{
$this->oauth = $oauth;
}

View File

@ -46,7 +46,7 @@ class POP3
*
* @var string
*/
const VERSION = '6.5.3';
const VERSION = '6.6.0';
/**
* Default POP3 port number.

View File

@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.5.3';
const VERSION = '6.6.0';
/**
* SMTP line break constant.
@ -187,6 +187,7 @@ class SMTP
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
];
/**
@ -482,7 +483,7 @@ class SMTP
* @param string $username The user name
* @param string $password The password
* @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2)
* @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication
* @param OAuthTokenProvider $OAuth An optional OAuthTokenProvider instance for XOAUTH2 authentication
*
* @return bool True if successfully authenticated
*/