diff --git a/lam/composer.lock b/lam/composer.lock index 72f8af26f..22f0a7785 100644 --- a/lam/composer.lock +++ b/lam/composer.lock @@ -1322,16 +1322,16 @@ }, { "name": "monolog/monolog", - "version": "2.9.1", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1" + "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", + "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", "shasum": "" }, "require": { @@ -1408,7 +1408,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.1" + "source": "https://github.com/Seldaek/monolog/tree/2.9.2" }, "funding": [ { @@ -1420,7 +1420,7 @@ "type": "tidelift" } ], - "time": "2023-02-06T13:44:46+00:00" + "time": "2023-10-27T15:25:26+00:00" }, { "name": "nesbot/carbon", @@ -1729,16 +1729,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.8.1", + "version": "v6.9.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016" + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "shasum": "" }, "require": { @@ -1758,6 +1758,7 @@ "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "ext-openssl": "Needed for secure SMTP sending and DKIM signing", "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", @@ -1797,7 +1798,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.8.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" }, "funding": [ { @@ -1805,20 +1806,20 @@ "type": "github" } ], - "time": "2023-08-29T08:26:30+00:00" + "time": "2023-11-25T22:23:28+00:00" }, { "name": "phpseclib/phpseclib", - "version": "3.0.23", + "version": "3.0.34", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50" + "reference": "56c79f16a6ae17e42089c06a2144467acc35348a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/866cc78fbd82462ffd880e3f65692afe928bed50", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56c79f16a6ae17e42089c06a2144467acc35348a", + "reference": "56c79f16a6ae17e42089c06a2144467acc35348a", "shasum": "" }, "require": { @@ -1899,7 +1900,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.23" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.34" }, "funding": [ { @@ -1915,7 +1916,7 @@ "type": "tidelift" } ], - "time": "2023-09-18T17:22:01+00:00" + "time": "2023-11-27T11:13:31+00:00" }, { "name": "psr/clock", @@ -2528,16 +2529,16 @@ }, { "name": "ramsey/uuid", - "version": "4.7.4", + "version": "4.7.5", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "60a4c63ab724854332900504274f6150ff26d286" + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", - "reference": "60a4c63ab724854332900504274f6150ff26d286", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", "shasum": "" }, "require": { @@ -2604,7 +2605,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.4" + "source": "https://github.com/ramsey/uuid/tree/4.7.5" }, "funding": [ { @@ -2616,7 +2617,7 @@ "type": "tidelift" } ], - "time": "2023-04-15T23:01:58+00:00" + "time": "2023-11-08T05:53:05+00:00" }, { "name": "spomky-labs/base64url", @@ -2832,16 +2833,16 @@ }, { "name": "symfony/http-client", - "version": "v5.4.29", + "version": "v5.4.31", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "04784c66cbee613a827363ee1e65db65392893c1" + "reference": "6cdf6cdf48101454f014a9ab4e0905f0b902389d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/04784c66cbee613a827363ee1e65db65392893c1", - "reference": "04784c66cbee613a827363ee1e65db65392893c1", + "url": "https://api.github.com/repos/symfony/http-client/zipball/6cdf6cdf48101454f014a9ab4e0905f0b902389d", + "reference": "6cdf6cdf48101454f014a9ab4e0905f0b902389d", "shasum": "" }, "require": { @@ -2903,7 +2904,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v5.4.29" + "source": "https://github.com/symfony/http-client/tree/v5.4.31" }, "funding": [ { @@ -2919,7 +2920,7 @@ "type": "tidelift" } ], - "time": "2023-09-14T20:49:15+00:00" + "time": "2023-10-29T12:33:05+00:00" }, { "name": "symfony/http-client-contracts", diff --git a/lam/lib/3rdParty/composer/composer/autoload_psr4.php b/lam/lib/3rdParty/composer/composer/autoload_psr4.php index 7354730b4..ba14e30ae 100644 --- a/lam/lib/3rdParty/composer/composer/autoload_psr4.php +++ b/lam/lib/3rdParty/composer/composer/autoload_psr4.php @@ -44,7 +44,7 @@ 'Jose\\Component\\Encryption\\' => array($vendorDir . '/web-token/jwt-encryption'), 'Jose\\Component\\Core\\' => array($vendorDir . '/web-token/jwt-core'), 'Jose\\Component\\Checker\\' => array($vendorDir . '/web-token/jwt-checker'), - 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/support'), + 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/support'), 'Illuminate\\Pagination\\' => array($vendorDir . '/illuminate/pagination'), 'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'), 'Http\\Factory\\Guzzle\\' => array($vendorDir . '/http-interop/http-factory-guzzle/src'), diff --git a/lam/lib/3rdParty/composer/composer/autoload_static.php b/lam/lib/3rdParty/composer/composer/autoload_static.php index 3e8e566f2..2f9b04520 100644 --- a/lam/lib/3rdParty/composer/composer/autoload_static.php +++ b/lam/lib/3rdParty/composer/composer/autoload_static.php @@ -393,9 +393,9 @@ class ComposerStaticInited73ceb9c1bdec18b7c6d09764d1bce5 ), 'Illuminate\\Support\\' => array ( - 0 => __DIR__ . '/..' . '/illuminate/conditionable', - 1 => __DIR__ . '/..' . '/illuminate/macroable', - 2 => __DIR__ . '/..' . '/illuminate/collections', + 0 => __DIR__ . '/..' . '/illuminate/collections', + 1 => __DIR__ . '/..' . '/illuminate/conditionable', + 2 => __DIR__ . '/..' . '/illuminate/macroable', 3 => __DIR__ . '/..' . '/illuminate/support', ), 'Illuminate\\Pagination\\' => diff --git a/lam/lib/3rdParty/composer/composer/installed.json b/lam/lib/3rdParty/composer/composer/installed.json index 4139917f6..001a2750c 100644 --- a/lam/lib/3rdParty/composer/composer/installed.json +++ b/lam/lib/3rdParty/composer/composer/installed.json @@ -1357,17 +1357,17 @@ }, { "name": "monolog/monolog", - "version": "2.9.1", - "version_normalized": "2.9.1.0", + "version": "2.9.2", + "version_normalized": "2.9.2.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1" + "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/f259e2b15fb95494c83f52d3caad003bbf5ffaa1", - "reference": "f259e2b15fb95494c83f52d3caad003bbf5ffaa1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", + "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", "shasum": "" }, "require": { @@ -1413,7 +1413,7 @@ "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, - "time": "2023-02-06T13:44:46+00:00", + "time": "2023-10-27T15:25:26+00:00", "type": "library", "extra": { "branch-alias": { @@ -1446,7 +1446,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.1" + "source": "https://github.com/Seldaek/monolog/tree/2.9.2" }, "funding": [ { @@ -1779,17 +1779,17 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.8.1", - "version_normalized": "6.8.1.0", + "version": "v6.9.1", + "version_normalized": "6.9.1.0", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016" + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "shasum": "" }, "require": { @@ -1809,6 +1809,7 @@ "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "ext-openssl": "Needed for secure SMTP sending and DKIM signing", "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", @@ -1818,7 +1819,7 @@ "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" }, - "time": "2023-08-29T08:26:30+00:00", + "time": "2023-11-25T22:23:28+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1850,7 +1851,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.8.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" }, "funding": [ { @@ -1862,17 +1863,17 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.23", - "version_normalized": "3.0.23.0", + "version": "3.0.34", + "version_normalized": "3.0.34.0", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50" + "reference": "56c79f16a6ae17e42089c06a2144467acc35348a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/866cc78fbd82462ffd880e3f65692afe928bed50", - "reference": "866cc78fbd82462ffd880e3f65692afe928bed50", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56c79f16a6ae17e42089c06a2144467acc35348a", + "reference": "56c79f16a6ae17e42089c06a2144467acc35348a", "shasum": "" }, "require": { @@ -1890,7 +1891,7 @@ "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." }, - "time": "2023-09-18T17:22:01+00:00", + "time": "2023-11-27T11:13:31+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1955,7 +1956,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.23" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.34" }, "funding": [ { @@ -2607,17 +2608,17 @@ }, { "name": "ramsey/uuid", - "version": "4.7.4", - "version_normalized": "4.7.4.0", + "version": "4.7.5", + "version_normalized": "4.7.5.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "60a4c63ab724854332900504274f6150ff26d286" + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286", - "reference": "60a4c63ab724854332900504274f6150ff26d286", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", "shasum": "" }, "require": { @@ -2658,7 +2659,7 @@ "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, - "time": "2023-04-15T23:01:58+00:00", + "time": "2023-11-08T05:53:05+00:00", "type": "library", "extra": { "captainhook": { @@ -2686,7 +2687,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.4" + "source": "https://github.com/ramsey/uuid/tree/4.7.5" }, "funding": [ { @@ -2909,17 +2910,17 @@ }, { "name": "symfony/http-client", - "version": "v5.4.29", - "version_normalized": "5.4.29.0", + "version": "v5.4.31", + "version_normalized": "5.4.31.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "04784c66cbee613a827363ee1e65db65392893c1" + "reference": "6cdf6cdf48101454f014a9ab4e0905f0b902389d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/04784c66cbee613a827363ee1e65db65392893c1", - "reference": "04784c66cbee613a827363ee1e65db65392893c1", + "url": "https://api.github.com/repos/symfony/http-client/zipball/6cdf6cdf48101454f014a9ab4e0905f0b902389d", + "reference": "6cdf6cdf48101454f014a9ab4e0905f0b902389d", "shasum": "" }, "require": { @@ -2952,7 +2953,7 @@ "symfony/process": "^4.4|^5.0|^6.0", "symfony/stopwatch": "^4.4|^5.0|^6.0" }, - "time": "2023-09-14T20:49:15+00:00", + "time": "2023-10-29T12:33:05+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2983,7 +2984,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v5.4.29" + "source": "https://github.com/symfony/http-client/tree/v5.4.31" }, "funding": [ { diff --git a/lam/lib/3rdParty/composer/composer/installed.php b/lam/lib/3rdParty/composer/composer/installed.php index c23582ed8..834a37928 100644 --- a/lam/lib/3rdParty/composer/composer/installed.php +++ b/lam/lib/3rdParty/composer/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '2996c1b87d6c1d08920ae01be6288bbd5eb6e2d8', + 'reference' => '1e73b37aa5fafa8ae7c5ce2433eca2e3d9c46be7', 'type' => 'library', 'install_path' => __DIR__ . '/../../../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '2996c1b87d6c1d08920ae01be6288bbd5eb6e2d8', + 'reference' => '1e73b37aa5fafa8ae7c5ce2433eca2e3d9c46be7', 'type' => 'library', 'install_path' => __DIR__ . '/../../../../', 'aliases' => array(), @@ -191,9 +191,9 @@ 'dev_requirement' => false, ), 'monolog/monolog' => array( - 'pretty_version' => '2.9.1', - 'version' => '2.9.1.0', - 'reference' => 'f259e2b15fb95494c83f52d3caad003bbf5ffaa1', + 'pretty_version' => '2.9.2', + 'version' => '2.9.2.0', + 'reference' => '437cb3628f4cf6042cc10ae97fc2b8472e48ca1f', 'type' => 'library', 'install_path' => __DIR__ . '/../monolog/monolog', 'aliases' => array(), @@ -248,18 +248,18 @@ 'dev_requirement' => false, ), 'phpmailer/phpmailer' => array( - 'pretty_version' => 'v6.8.1', - 'version' => '6.8.1.0', - 'reference' => 'e88da8d679acc3824ff231fdc553565b802ac016', + 'pretty_version' => 'v6.9.1', + 'version' => '6.9.1.0', + 'reference' => '039de174cd9c17a8389754d3b877a2ed22743e18', 'type' => 'library', 'install_path' => __DIR__ . '/../phpmailer/phpmailer', 'aliases' => array(), 'dev_requirement' => false, ), 'phpseclib/phpseclib' => array( - 'pretty_version' => '3.0.23', - 'version' => '3.0.23.0', - 'reference' => '866cc78fbd82462ffd880e3f65692afe928bed50', + 'pretty_version' => '3.0.34', + 'version' => '3.0.34.0', + 'reference' => '56c79f16a6ae17e42089c06a2144467acc35348a', 'type' => 'library', 'install_path' => __DIR__ . '/../phpseclib/phpseclib', 'aliases' => array(), @@ -398,9 +398,9 @@ 'dev_requirement' => false, ), 'ramsey/uuid' => array( - 'pretty_version' => '4.7.4', - 'version' => '4.7.4.0', - 'reference' => '60a4c63ab724854332900504274f6150ff26d286', + 'pretty_version' => '4.7.5', + 'version' => '4.7.5.0', + 'reference' => '5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e', 'type' => 'library', 'install_path' => __DIR__ . '/../ramsey/uuid', 'aliases' => array(), @@ -409,7 +409,7 @@ 'rhumsaa/uuid' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '4.7.4', + 0 => '4.7.5', ), ), 'spomky-labs/base64url' => array( @@ -440,9 +440,9 @@ 'dev_requirement' => false, ), 'symfony/http-client' => array( - 'pretty_version' => 'v5.4.29', - 'version' => '5.4.29.0', - 'reference' => '04784c66cbee613a827363ee1e65db65392893c1', + 'pretty_version' => 'v5.4.31', + 'version' => '5.4.31.0', + 'reference' => '6cdf6cdf48101454f014a9ab4e0905f0b902389d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-client', 'aliases' => array(), diff --git a/lam/lib/3rdParty/composer/monolog/monolog/CHANGELOG.md b/lam/lib/3rdParty/composer/monolog/monolog/CHANGELOG.md index 8a8c65124..aca1bdd0d 100644 --- a/lam/lib/3rdParty/composer/monolog/monolog/CHANGELOG.md +++ b/lam/lib/3rdParty/composer/monolog/monolog/CHANGELOG.md @@ -1,3 +1,9 @@ +### 2.9.2 (2023-10-27) + + * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804) + * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815) + * Fixed normalization error when normalizing incomplete classes (#1833) + ### 2.9.1 (2023-02-06) * Fixed Logger not being serializable anymore (#1792) diff --git a/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/ErrorHandler.php b/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/ErrorHandler.php index 576f1713f..1406d34e8 100644 --- a/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/ErrorHandler.php +++ b/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/ErrorHandler.php @@ -198,7 +198,7 @@ private function handleException(\Throwable $e): void ($this->previousExceptionHandler)($e); } - if (!headers_sent() && !ini_get('display_errors')) { + if (!headers_sent() && in_array(strtolower((string) ini_get('display_errors')), ['0', '', 'false', 'off', 'none', 'no'], true)) { http_response_code(500); } diff --git a/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Formatter/LineFormatter.php index b31b2971a..e6e789833 100644 --- a/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ b/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Formatter/LineFormatter.php @@ -155,7 +155,7 @@ protected function normalizeException(\Throwable $e, int $depth = 0): string do { $depth++; if ($depth > $this->maxNormalizeDepth) { - $str .= '\n[previous exception] Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; + $str .= "\n[previous exception] Over " . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; break; } diff --git a/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php index 5441bc0aa..f926a842f 100644 --- a/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ b/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -174,6 +174,9 @@ protected function normalize($data, int $depth = 0) if ($data instanceof \JsonSerializable) { /** @var null|scalar|array $value */ $value = $data->jsonSerialize(); + } elseif (\get_class($data) === '__PHP_Incomplete_Class') { + $accessor = new \ArrayObject($data); + $value = (string) $accessor['__PHP_Incomplete_Class_Name']; } elseif (method_exists($data, '__toString')) { /** @var string $value */ $value = $data->__toString(); diff --git a/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Handler/StreamHandler.php index 651835122..82c048e1c 100644 --- a/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ b/lam/lib/3rdParty/composer/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -135,11 +135,14 @@ protected function write(array $record): void $this->createDir($url); $this->errorMessage = null; set_error_handler([$this, 'customErrorHandler']); - $stream = fopen($url, 'a'); - if ($this->filePermission !== null) { - @chmod($url, $this->filePermission); + try { + $stream = fopen($url, 'a'); + if ($this->filePermission !== null) { + @chmod($url, $this->filePermission); + } + } finally { + restore_error_handler(); } - restore_error_handler(); if (!is_resource($stream)) { $this->stream = null; diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/.editorconfig b/lam/lib/3rdParty/composer/phpmailer/phpmailer/.editorconfig new file mode 100644 index 000000000..a7c44ddb1 --- /dev/null +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/README.md b/lam/lib/3rdParty/composer/phpmailer/phpmailer/README.md index 878274f48..e3e4ecff3 100644 --- a/lam/lib/3rdParty/composer/phpmailer/phpmailer/README.md +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/README.md @@ -47,7 +47,7 @@ This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lg 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.8.1" +"phpmailer/phpmailer": "^6.9.1" ``` or run @@ -58,7 +58,8 @@ composer require phpmailer/phpmailer Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer. -If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`. +If you want to use XOAUTH2 authentication, you will also need to add a dependency on the `league/oauth2-client` and appropriate service adapters package in your `composer.json`, or take a look at +by @decomplexity's [SendOauth2 wrapper](https://github.com/decomplexity/SendOauth2), especially if you're using Microsoft services. Alternatively, if you're not using Composer, you can [download PHPMailer as a zip file](https://github.com/PHPMailer/PHPMailer/archive/master.zip), (note that docs and examples are not included in the zip file), then copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually: diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/VERSION b/lam/lib/3rdParty/composer/phpmailer/phpmailer/VERSION index 23863d3de..dc3829f5e 100644 --- a/lam/lib/3rdParty/composer/phpmailer/phpmailer/VERSION +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/VERSION @@ -1 +1 @@ -6.8.1 \ No newline at end of file +6.9.1 diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/composer.json b/lam/lib/3rdParty/composer/phpmailer/phpmailer/composer.json index 2fd2f4c20..fa170a0bb 100644 --- a/lam/lib/3rdParty/composer/phpmailer/phpmailer/composer.json +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/composer.json @@ -47,6 +47,7 @@ "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "ext-openssl": "Needed for secure SMTP sending and DKIM signing", "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-as.php b/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-as.php new file mode 100644 index 000000000..327dfbafa --- /dev/null +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-as.php @@ -0,0 +1,35 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP ত্ৰুটি: প্ৰমাণীকৰণ কৰিব নোৱাৰি'; +$PHPMAILER_LANG['buggy_php'] = 'আপোনাৰ PHP সংস্কৰণ এটা বাগৰ দ্বাৰা প্ৰভাৱিত হয় যাৰ ফলত নষ্ট বাৰ্তা হব পাৰে । ইয়াক সমাধান কৰিবলে, প্ৰেৰণ কৰিবলে SMTP ব্যৱহাৰ কৰক, আপোনাৰ php.ini ত mail.add_x_header বিকল্প নিষ্ক্ৰিয় কৰক, MacOS বা Linux লৈ সলনি কৰক, বা আপোনাৰ PHP সংস্কৰণ 7.0.17+ বা 7.1.3+ লৈ সলনি কৰক ।'; +$PHPMAILER_LANG['connect_host'] = 'SMTP ত্ৰুটি: SMTP চাৰ্ভাৰৰ সৈতে সংযোগ কৰিবলে অক্ষম'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্ৰুটি: তথ্য গ্ৰহণ কৰা হোৱা নাই'; +$PHPMAILER_LANG['empty_message'] = 'বাৰ্তাৰ মূখ্য অংশ খালী।'; +$PHPMAILER_LANG['encoding'] = 'অজ্ঞাত এনকোডিং: '; +$PHPMAILER_LANG['execute'] = 'এক্সিকিউট কৰিব নোৱাৰি: '; +$PHPMAILER_LANG['extension_missing'] = 'সম্প্ৰসাৰণ নোহোৱা হৈছে: '; +$PHPMAILER_LANG['file_access'] = 'ফাইল অভিগম কৰিবলে অক্ষম: '; +$PHPMAILER_LANG['file_open'] = 'ফাইল ত্ৰুটি: ফাইল খোলিবলৈ অক্ষম: '; +$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্ৰেৰকৰ ঠিকনা(সমূহ) ব্যৰ্থ: '; +$PHPMAILER_LANG['instantiate'] = 'মেইল ফাংচনৰ এটা উদাহৰণ সৃষ্টি কৰিবলে অক্ষম'; +$PHPMAILER_LANG['invalid_address'] = 'প্ৰেৰণ কৰিব নোৱাৰি: অবৈধ ইমেইল ঠিকনা: '; +$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডাৰৰ নাম বা মান'; +$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোষ্টেন্ট্ৰি: '; +$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হস্ট:'; +$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলাৰ সমৰ্থিত নহয়।'; +$PHPMAILER_LANG['provide_address'] = 'আপুনি অন্ততঃ এটা গন্তব্য ইমেইল ঠিকনা দিব লাগিব'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্ৰুটি: নিম্নলিখিত গন্তব্যস্থানসমূহ ব্যৰ্থ: '; +$PHPMAILER_LANG['signing'] = 'স্বাক্ষৰ কৰাত ব্যৰ্থ: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP কড: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'অতিৰিক্ত SMTP তথ্য: '; +$PHPMAILER_LANG['smtp_detail'] = 'বিৱৰণ:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যৰ্থ'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP চাৰ্ভাৰৰ ত্ৰুটি: '; +$PHPMAILER_LANG['variable_set'] = 'চলক নিৰ্ধাৰণ কৰিব পৰা নগল: '; +$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত সম্প্ৰসাৰণ: '; diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-bn.php b/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-bn.php new file mode 100644 index 000000000..473651080 --- /dev/null +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-bn.php @@ -0,0 +1,35 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP ত্রুটি: প্রমাণীকরণ করতে অক্ষম৷'; +$PHPMAILER_LANG['buggy_php'] = 'আপনার PHP সংস্করণ একটি বাগ দ্বারা প্রভাবিত হয় যার ফলে দূষিত বার্তা হতে পারে। এটি ঠিক করতে, পাঠাতে SMTP ব্যবহার করুন, আপনার php.ini এ mail.add_x_header বিকল্পটি নিষ্ক্রিয় করুন, MacOS বা Linux-এ স্যুইচ করুন, অথবা আপনার PHP সংস্করণকে 7.0.17+ বা 7.1.3+ এ পরিবর্তন করুন।'; +$PHPMAILER_LANG['connect_host'] = 'SMTP ত্রুটি: SMTP সার্ভারের সাথে সংযোগ করতে অক্ষম৷'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP ত্রুটি: ডেটা গ্রহণ করা হয়নি৷'; +$PHPMAILER_LANG['empty_message'] = 'বার্তার অংশটি খালি।'; +$PHPMAILER_LANG['encoding'] = 'অজানা এনকোডিং: '; +$PHPMAILER_LANG['execute'] = 'নির্বাহ করতে অক্ষম: '; +$PHPMAILER_LANG['extension_missing'] = 'এক্সটেনশন অনুপস্থিত:'; +$PHPMAILER_LANG['file_access'] = 'ফাইল অ্যাক্সেস করতে অক্ষম: '; +$PHPMAILER_LANG['file_open'] = 'ফাইল ত্রুটি: ফাইল খুলতে অক্ষম: '; +$PHPMAILER_LANG['from_failed'] = 'নিম্নলিখিত প্রেরকের ঠিকানা(গুলি) ব্যর্থ হয়েছে: '; +$PHPMAILER_LANG['instantiate'] = 'মেল ফাংশনের একটি উদাহরণ তৈরি করতে অক্ষম৷'; +$PHPMAILER_LANG['invalid_address'] = 'পাঠাতে অক্ষম: অবৈধ ইমেল ঠিকানা: '; +$PHPMAILER_LANG['invalid_header'] = 'অবৈধ হেডার নাম বা মান'; +$PHPMAILER_LANG['invalid_hostentry'] = 'অবৈধ হোস্টেন্ট্রি: '; +$PHPMAILER_LANG['invalid_host'] = 'অবৈধ হোস্ট:'; +$PHPMAILER_LANG['mailer_not_supported'] = 'মেইলার সমর্থিত নয়।'; +$PHPMAILER_LANG['provide_address'] = 'আপনাকে অবশ্যই অন্তত একটি গন্তব্য ইমেল ঠিকানা প্রদান করতে হবে৷'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP ত্রুটি: নিম্নলিখিত গন্তব্যগুলি ব্যর্থ হয়েছে: '; +$PHPMAILER_LANG['signing'] = 'স্বাক্ষর করতে ব্যর্থ হয়েছে: '; +$PHPMAILER_LANG['smtp_code'] = 'SMTP কোড: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'অতিরিক্ত SMTP তথ্য:'; +$PHPMAILER_LANG['smtp_detail'] = 'বর্ণনা: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP সংযোগ() ব্যর্থ হয়েছে৷'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP সার্ভার ত্রুটি: '; +$PHPMAILER_LANG['variable_set'] = 'পরিবর্তনশীল সেট করা যায়নি: '; +$PHPMAILER_LANG['extension_missing'] = 'অনুপস্থিত এক্সটেনশন: '; diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-da.php b/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-da.php index 8b7b38a6e..db9a1ef5b 100644 --- a/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-da.php +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-da.php @@ -9,6 +9,7 @@ */ $PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Login mislykkedes.'; +$PHPMAILER_LANG['buggy_php'] = 'Din version af PHP er berørt af en fejl, som gør at dine beskeder muligvis vises forkert. For at rette dette kan du skifte til SMTP, slå mail.add_x_header headeren i din php.ini fil fra, skifte til MacOS eller Linux eller opgradere din version af PHP til 7.0.17+ eller 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Forbindelse til SMTP serveren kunne ikke oprettes.'; $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data blev ikke accepteret.'; $PHPMAILER_LANG['empty_message'] = 'Meddelelsen er uden indhold'; diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-pl.php b/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-pl.php index b0469fdb7..cb7b2c210 100644 --- a/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-pl.php +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/language/phpmailer.lang-pl.php @@ -6,21 +6,28 @@ */ $PHPMAILER_LANG['authenticate'] = 'Błąd SMTP: Nie można przeprowadzić uwierzytelnienia.'; +$PHPMAILER_LANG['buggy_php'] = 'Twoja wersja PHP zawiera błąd, który może powodować uszkodzenie wiadomości. Aby go naprawić, przełącz się na wysyłanie za pomocą SMTP, wyłącz opcję mail.add_x_header w php.ini, przełącz się na MacOS lub Linux lub zaktualizuj PHP do wersji 7.0.17+ lub 7.1.3+.'; $PHPMAILER_LANG['connect_host'] = 'Błąd SMTP: Nie można połączyć się z wybranym hostem.'; $PHPMAILER_LANG['data_not_accepted'] = 'Błąd SMTP: Dane nie zostały przyjęte.'; $PHPMAILER_LANG['empty_message'] = 'Wiadomość jest pusta.'; $PHPMAILER_LANG['encoding'] = 'Błędny sposób kodowania znaków: '; $PHPMAILER_LANG['execute'] = 'Nie można uruchomić: '; +$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: '; $PHPMAILER_LANG['file_access'] = 'Brak dostępu do pliku: '; $PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: '; $PHPMAILER_LANG['from_failed'] = 'Następujący adres nadawcy jest nieprawidłowy lub nie istnieje: '; $PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.'; $PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, ' . 'następujący adres odbiorcy jest nieprawidłowy lub nie istnieje: '; +$PHPMAILER_LANG['invalid_header'] = 'Nieprawidłowa nazwa lub wartość nagłówka'; +$PHPMAILER_LANG['invalid_hostentry'] = 'Nieprawidłowy wpis hosta: '; +$PHPMAILER_LANG['invalid_host'] = 'Nieprawidłowy host: '; $PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email odbiorcy.'; $PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.'; $PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi lub nie istnieją: '; $PHPMAILER_LANG['signing'] = 'Błąd podpisywania wiadomości: '; +$PHPMAILER_LANG['smtp_code'] = 'Kod SMTP: '; +$PHPMAILER_LANG['smtp_code_ex'] = 'Dodatkowe informacje SMTP: '; $PHPMAILER_LANG['smtp_connect_failed'] = 'Wywołanie funkcji SMTP Connect() zostało zakończone niepowodzeniem.'; +$PHPMAILER_LANG['smtp_detail'] = 'Szczegóły: '; $PHPMAILER_LANG['smtp_error'] = 'Błąd SMTP: '; $PHPMAILER_LANG['variable_set'] = 'Nie można ustawić lub zmodyfikować zmiennej: '; -$PHPMAILER_LANG['extension_missing'] = 'Brakujące rozszerzenie: '; diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/PHPMailer.php b/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/PHPMailer.php index 7f56ea234..ba4bcd472 100644 --- a/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/PHPMailer.php +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/PHPMailer.php @@ -357,6 +357,13 @@ class PHPMailer */ public $AuthType = ''; + /** + * SMTP SMTPXClient command attibutes + * + * @var array + */ + protected $SMTPXClient = []; + /** * An implementation of the PHPMailer OAuthTokenProvider interface. * @@ -750,7 +757,7 @@ class PHPMailer * * @var string */ - const VERSION = '6.8.1'; + const VERSION = '6.9.1'; /** * Error severity: message only, continue processing. @@ -1571,6 +1578,10 @@ public function preSend() //Validate From, Sender, and ConfirmReadingTo addresses foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { + if ($this->{$address_kind} === null) { + $this->{$address_kind} = ''; + continue; + } $this->{$address_kind} = trim($this->{$address_kind}); if (empty($this->{$address_kind})) { continue; @@ -1997,6 +2008,38 @@ public function setSMTPInstance(SMTP $smtp) return $this->smtp; } + /** + * Provide SMTP XCLIENT attributes + * + * @param string $name Attribute name + * @param ?string $value Attribute value + * + * @return bool + */ + public function setSMTPXclientAttribute($name, $value) + { + if (!in_array($name, SMTP::$xclient_allowed_attributes)) { + return false; + } + if (isset($this->SMTPXClient[$name]) && $value === null) { + unset($this->SMTPXClient[$name]); + } elseif ($value !== null) { + $this->SMTPXClient[$name] = $value; + } + + return true; + } + + /** + * Get SMTP XCLIENT attributes + * + * @return array + */ + public function getSMTPXclientAttributes() + { + return $this->SMTPXClient; + } + /** * Send mail via SMTP. * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. @@ -2025,6 +2068,9 @@ protected function smtpSend($header, $body) } else { $smtp_from = $this->Sender; } + if (count($this->SMTPXClient)) { + $this->smtp->xclient($this->SMTPXClient); + } if (!$this->smtp->mail($smtp_from)) { $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); @@ -2187,10 +2233,17 @@ public function smtpConnect($options = null) $this->smtp->hello($hello); //Automatically enable TLS encryption if: //* it's not disabled + //* we are not connecting to localhost //* we have openssl extension //* we are not already using SSL //* the server offers STARTTLS - if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) { + if ( + $this->SMTPAutoTLS && + $this->Host !== 'localhost' && + $sslext && + $secure !== 'ssl' && + $this->smtp->getServerExt('STARTTLS') + ) { $tls = true; } if ($tls) { @@ -4047,6 +4100,79 @@ public function clearCustomHeaders() $this->CustomHeader = []; } + /** + * Clear a specific custom header by name or name and value. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + * + * @return bool True if a header was replaced successfully + */ + public function clearCustomHeader($name, $value = null) + { + if (null === $value && strpos($name, ':') !== false) { + //Value passed in as name:value + list($name, $value) = explode(':', $name, 2); + } + $name = trim($name); + $value = (null === $value) ? null : trim($value); + + foreach ($this->CustomHeader as $k => $pair) { + if ($pair[0] == $name) { + // We remove the header if the value is not provided or it matches. + if (null === $value || $pair[1] == $value) { + unset($this->CustomHeader[$k]); + } + } + } + + return true; + } + + /** + * Replace a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + * + * @return bool True if a header was replaced successfully + * @throws Exception + */ + public function replaceCustomHeader($name, $value = null) + { + if (null === $value && strpos($name, ':') !== false) { + //Value passed in as name:value + list($name, $value) = explode(':', $name, 2); + } + $name = trim($name); + $value = (null === $value) ? '' : trim($value); + + $replaced = false; + foreach ($this->CustomHeader as $k => $pair) { + if ($pair[0] == $name) { + if ($replaced) { + unset($this->CustomHeader[$k]); + continue; + } + if (strpbrk($name . $value, "\r\n") !== false) { + if ($this->exceptions) { + throw new Exception($this->lang('invalid_header')); + } + + return false; + } + $this->CustomHeader[$k] = [$name, $value]; + $replaced = true; + } + } + + return true; + } + /** * Add an error message to the error container. * diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/POP3.php b/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/POP3.php index b92a1f248..7b25fdd7e 100644 --- a/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/POP3.php +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/POP3.php @@ -46,7 +46,7 @@ class POP3 * * @var string */ - const VERSION = '6.8.1'; + const VERSION = '6.9.1'; /** * Default POP3 port number. diff --git a/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/SMTP.php b/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/SMTP.php index 2b6384030..1b5b00771 100644 --- a/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/SMTP.php +++ b/lam/lib/3rdParty/composer/phpmailer/phpmailer/src/SMTP.php @@ -35,7 +35,7 @@ class SMTP * * @var string */ - const VERSION = '6.8.1'; + const VERSION = '6.9.1'; /** * SMTP line break constant. @@ -198,6 +198,18 @@ class SMTP 'Mailjet' => '/[\d]{3} OK queued as (.*)/', ]; + /** + * Allowed SMTP XCLIENT attributes. + * Must be allowed by the SMTP server. EHLO response is not checked. + * + * @see https://www.postfix.org/XCLIENT_README.html + * + * @var array + */ + public static $xclient_allowed_attributes = [ + 'NAME', 'ADDR', 'PORT', 'PROTO', 'HELO', 'LOGIN', 'DESTADDR', 'DESTPORT' + ]; + /** * The last transaction ID issued in response to a DATA command, * if one was detected. @@ -971,6 +983,25 @@ public function recipient($address, $dsn = '') ); } + /** + * Send SMTP XCLIENT command to server and check its return code. + * + * @return bool True on success + */ + public function xclient(array $vars) + { + $xclient_options = ""; + foreach ($vars as $key => $value) { + if (in_array($key, SMTP::$xclient_allowed_attributes)) { + $xclient_options .= " {$key}={$value}"; + } + } + if (!$xclient_options) { + return true; + } + return $this->sendCommand('XCLIENT', 'XCLIENT' . $xclient_options, 250); + } + /** * Send an SMTP RSET command. * Abort any transaction that is currently in progress. diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php index 4638a5393..7aa554808 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS8.php @@ -141,6 +141,7 @@ private static function getPBES1EncryptionObject($algo) break; case 'RC2': $cipher = new RC2('cbc'); + $cipher->setKeyLength(64); break; case '3-KeyTripleDES': $cipher = new TripleDES('cbc'); @@ -218,7 +219,7 @@ private static function getPBES2EncryptionObject($algo) { switch ($algo) { case 'desCBC': - $cipher = new TripleDES('cbc'); + $cipher = new DES('cbc'); break; case 'des-EDE3-CBC': $cipher = new TripleDES('cbc'); diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php index 31bb2e879..00bfdd45c 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Common/SymmetricKey.php @@ -668,11 +668,11 @@ protected static function initialize_static_variables() switch (true) { // PHP_OS & "\xDF\xDF\xDF" == strtoupper(substr(PHP_OS, 0, 3)), but a lot faster case (PHP_OS & "\xDF\xDF\xDF") === 'WIN': - case (php_uname('m') & "\xDF\xDF\xDF") != 'ARM': + case !(is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM'): case defined('PHP_INT_SIZE') && PHP_INT_SIZE == 8: self::$use_reg_intval = true; break; - case (php_uname('m') & "\xDF\xDF\xDF") == 'ARM': + case is_string(php_uname('m')) && (php_uname('m') & "\xDF\xDF\xDF") == 'ARM': switch (true) { /* PHP 7.0.0 introduced a bug that affected 32-bit ARM processors: diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/IEEE.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/IEEE.php new file mode 100644 index 000000000..69139da45 --- /dev/null +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/IEEE.php @@ -0,0 +1,66 @@ + + * @copyright 2016 Jim Wigginton + * @license http://www.opensource.org/licenses/mit-license.html MIT License + * @link http://phpseclib.sourceforge.net + */ + +namespace phpseclib3\Crypt\EC\Formats\Signature; + +use phpseclib3\Math\BigInteger; + +/** + * ASN1 Signature Handler + * + * @author Jim Wigginton + */ +abstract class IEEE +{ + /** + * Loads a signature + * + * @param string $sig + * @return array + */ + public static function load($sig) + { + if (!is_string($sig)) { + return false; + } + + $len = strlen($sig); + if ($len & 1) { + return false; + } + + $r = new BigInteger(substr($sig, 0, $len >> 1), 256); + $s = new BigInteger(substr($sig, $len >> 1), 256); + + return compact('r', 's'); + } + + /** + * Returns a signature in the appropriate format + * + * @param \phpseclib3\Math\BigInteger $r + * @param \phpseclib3\Math\BigInteger $s + * @return string + */ + public static function save(BigInteger $r, BigInteger $s) + { + $r = $r->toBytes(); + $s = $s->toBytes(); + $len = max(strlen($r), strlen($s)); + return str_pad($r, $len, "\0", STR_PAD_LEFT) . str_pad($s, $len, "\0", STR_PAD_LEFT); + } +} diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php index cd8b76272..ff31f9c88 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Crypt/Rijndael.php @@ -833,7 +833,6 @@ protected function setupInlineCrypt() // Generating encrypt code: $init_encrypt .= ' - static $tables; if (empty($tables)) { $tables = &$this->getTables(); } @@ -890,7 +889,6 @@ protected function setupInlineCrypt() // Generating decrypt code: $init_decrypt .= ' - static $invtables; if (empty($invtables)) { $invtables = &$this->getInvTables(); } @@ -947,7 +945,7 @@ protected function setupInlineCrypt() $this->inline_crypt = $this->createInlineCryptFunction( [ - 'init_crypt' => '', + 'init_crypt' => 'static $tables; static $invtables;', 'init_encrypt' => $init_encrypt, 'init_decrypt' => $init_decrypt, 'encrypt_block' => $encrypt_block, diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/File/X509.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/File/X509.php index b9f1c79e6..5e2f073f4 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/File/X509.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/File/X509.php @@ -1042,7 +1042,8 @@ public function validateURL($url) if ($names = $this->getExtension('id-ce-subjectAltName')) { foreach ($names as $name) { foreach ($name as $key => $value) { - $value = str_replace(['.', '*'], ['\.', '[^.]*'], $value); + $value = preg_quote($value); + $value = str_replace('\*', '[^.]*', $value); switch ($key) { case 'dNSName': /* From RFC2818 "HTTP over TLS": diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger.php index c6609e4d5..67d4788f9 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger.php @@ -143,13 +143,16 @@ private static function initialize_static_variables() ['PHP64', ['DefaultEngine']], ['PHP32', ['DefaultEngine']] ]; + foreach ($engines as $engine) { try { self::setEngine($engine[0], $engine[1]); - break; + return; } catch (\Exception $e) { } } + + throw new \UnexpectedValueException('No valid BigInteger found. This is only possible when JIT is enabled on Windows and neither the GMP or BCMath extensions are available so either disable JIT or install GMP / BCMath'); } } diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php index ab9bdc99b..7e85783ef 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP.php @@ -1326,4 +1326,19 @@ private function bitwise_small_split($split) return array_reverse($vals); } + + /** + * @return bool + */ + protected static function testJITOnWindows() + { + // see https://github.com/php/php-src/issues/11917 + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && function_exists('opcache_get_status') && PHP_VERSION_ID < 80213 && !defined('PHPSECLIB_ALLOW_JIT')) { + $status = opcache_get_status(); + if ($status && isset($status['jit']) && $status['jit']['enabled'] && $status['jit']['on']) { + return true; + } + } + return false; + } } diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php index 18f78cdb7..3a775e7db 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP32.php @@ -102,7 +102,7 @@ protected function initialize($base) */ public static function isValidEngine() { - return PHP_INT_SIZE >= 4; + return PHP_INT_SIZE >= 4 && !self::testJITOnWindows(); } /** diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php index ca11c08d4..70a2e173b 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/PHP64.php @@ -103,7 +103,7 @@ protected function initialize($base) */ public static function isValidEngine() { - return PHP_INT_SIZE >= 8; + return PHP_INT_SIZE >= 8 && !self::testJITOnWindows(); } /** diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BinaryField.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BinaryField.php index 3e21a67ad..5da8c937e 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BinaryField.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/BinaryField.php @@ -48,6 +48,15 @@ class BinaryField extends FiniteField public function __construct(...$indices) { $m = array_shift($indices); + if ($m > 571) { + /* sect571r1 and sect571k1 are the largest binary curves that https://www.secg.org/sec2-v2.pdf defines + altho theoretically there may be legit reasons to use binary finite fields with larger degrees + imposing a limit on the maximum size is both reasonable and precedented. in particular, + http://tools.ietf.org/html/rfc4253#section-6.1 (The Secure Shell (SSH) Transport Layer Protocol) says + "implementations SHOULD check that the packet length is reasonable in order for the implementation to + avoid denial of service and/or buffer overflow attacks" */ + throw new \OutOfBoundsException('Degrees larger than 571 are not supported'); + } $val = str_repeat('0', $m) . '1'; foreach ($indices as $index) { $val[$index] = '1'; diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php index ddb04912d..1bd7aaf0f 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Math/PrimeField/Integer.php @@ -263,7 +263,7 @@ public function squareRoot() $r = $this->value->powMod($temp, static::$modulo[$this->instanceID]); while (!$t->equals($one)) { - for ($i == clone $one; $i->compare($m) < 0; $i = $i->add($one)) { + for ($i = clone $one; $i->compare($m) < 0; $i = $i->add($one)) { if ($t->powMod($two->pow($i), static::$modulo[$this->instanceID])->equals($one)) { break; } diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Net/SSH2.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Net/SSH2.php index 0def19072..57edc48cb 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Net/SSH2.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/Net/SSH2.php @@ -1122,6 +1122,7 @@ public function __construct($host, $port = 22, $timeout = 10) 4 => 'NET_SSH2_MSG_DEBUG', 5 => 'NET_SSH2_MSG_SERVICE_REQUEST', 6 => 'NET_SSH2_MSG_SERVICE_ACCEPT', + 7 => 'NET_SSH2_MSG_EXT_INFO', // RFC 8308 20 => 'NET_SSH2_MSG_KEXINIT', 21 => 'NET_SSH2_MSG_NEWKEYS', 30 => 'NET_SSH2_MSG_KEXDH_INIT', @@ -1535,6 +1536,8 @@ private function key_exchange($kexinit_payload_server = false) $preferred['client_to_server']['comp'] : SSH2::getSupportedCompressionAlgorithms(); + $kex_algorithms = array_merge($kex_algorithms, array('ext-info-c')); + // some SSH servers have buggy implementations of some of the above algorithms switch (true) { case $this->server_identifier == 'SSH-2.0-SSHD': @@ -1551,6 +1554,20 @@ private function key_exchange($kexinit_payload_server = false) ['hmac-sha1-96', 'hmac-md5-96'] )); } + break; + case substr($this->server_identifier, 0, 24) == 'SSH-2.0-TurboFTP_SERVER_': + if (!isset($preferred['server_to_client']['crypt'])) { + $s2c_encryption_algorithms = array_values(array_diff( + $s2c_encryption_algorithms, + ['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com'] + )); + } + if (!isset($preferred['client_to_server']['crypt'])) { + $c2s_encryption_algorithms = array_values(array_diff( + $c2s_encryption_algorithms, + ['aes128-gcm@openssh.com', 'aes256-gcm@openssh.com'] + )); + } } $client_cookie = Random::string(16); @@ -2315,10 +2332,26 @@ private function login_helper($username, $password = null) return $this->login_helper($username, $password); } $this->disconnect_helper(NET_SSH2_DISCONNECT_CONNECTION_LOST); - throw new ConnectionClosedException('Connection closed by server'); + throw $e; } - list($type, $service) = Strings::unpackSSH2('Cs', $response); + list($type) = Strings::unpackSSH2('C', $response); + + if ($type == NET_SSH2_MSG_EXT_INFO) { + list($nr_extensions) = Strings::unpackSSH2('N', $response); + for ($i = 0; $i < $nr_extensions; $i++) { + list($extension_name, $extension_value) = Strings::unpackSSH2('ss', $response); + if ($extension_name == 'server-sig-algs') { + $this->supported_private_key_algorithms = explode(',', $extension_value); + } + } + + $response = $this->get_binary_packet(); + list($type) = Strings::unpackSSH2('C', $response); + } + + list($service) = Strings::unpackSSH2('s', $response); + if ($type != NET_SSH2_MSG_SERVICE_ACCEPT || $service != 'ssh-userauth') { $this->disconnect_helper(NET_SSH2_DISCONNECT_PROTOCOL_ERROR); throw new \UnexpectedValueException('Expected SSH_MSG_SERVICE_ACCEPT'); @@ -2594,7 +2627,7 @@ private function privatekey_login($username, PrivateKey $privatekey) $privatekey = $privatekey->withPadding(RSA::SIGNATURE_PKCS1); $algos = ['rsa-sha2-256', 'rsa-sha2-512', 'ssh-rsa']; if (isset($this->preferred['hostkey'])) { - $algos = array_intersect($this->preferred['hostkey'], $algos); + $algos = array_intersect($algos, $this->preferred['hostkey']); } $algo = self::array_intersect_first($algos, $this->supported_private_key_algorithms); switch ($algo) { @@ -3403,6 +3436,8 @@ protected function reset_connection($reason) $this->session_id = false; $this->retry_connect = true; $this->get_seq_no = $this->send_seq_no = 0; + $this->channel_status = []; + $this->channel_id_last_interactive = 0; } /** @@ -3728,7 +3763,7 @@ private function filter($payload, $skip_channel_filter) case NET_SSH2_MSG_DISCONNECT: Strings::shift($payload, 1); list($reason_code, $message) = Strings::unpackSSH2('Ns', $payload); - $this->errors[] = 'SSH_MSG_DISCONNECT: ' . static::$disconnect_reasons[$reason_code] . "\r\n$message"; + $this->errors[] = 'SSH_MSG_DISCONNECT: ' . self::$disconnect_reasons[$reason_code] . "\r\n$message"; $this->bitmap = 0; return false; case NET_SSH2_MSG_IGNORE: diff --git a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/bootstrap.php b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/bootstrap.php index b794d5497..517106c3a 100644 --- a/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/bootstrap.php +++ b/lam/lib/3rdParty/composer/phpseclib/phpseclib/phpseclib/bootstrap.php @@ -20,13 +20,3 @@ ); } } - -// see https://github.com/php/php-src/issues/11917 -if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && function_exists('opcache_get_status') && !defined('PHPSECLIB_ALLOW_JIT')) { - $status = opcache_get_status(); - if ($status && isset($status['jit']) && $status['jit']['enabled'] && $status['jit']['on']) { - throw new UnexpectedValueException( - 'JIT on Windows is not currently supported' - ); - } -} diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/UnixTimeGenerator.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/UnixTimeGenerator.php index af94decf2..d7c8ed4ee 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/UnixTimeGenerator.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/Generator/UnixTimeGenerator.php @@ -142,7 +142,7 @@ private function increment(): string self::$seedIndex = 21; } - self::$rand[5] = 0xffff & $carry = self::$rand[5] + (self::$seedParts[self::$seedIndex--] & 0xffffff); + self::$rand[5] = 0xffff & $carry = self::$rand[5] + 1 + (self::$seedParts[self::$seedIndex--] & 0xffffff); self::$rand[4] = 0xffff & $carry = self::$rand[4] + ($carry >> 16); self::$rand[3] = 0xffff & $carry = self::$rand[3] + ($carry >> 16); self::$rand[2] = 0xffff & $carry = self::$rand[2] + ($carry >> 16); diff --git a/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidInterface.php b/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidInterface.php index 0a9780805..cac9457de 100644 --- a/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidInterface.php +++ b/lam/lib/3rdParty/composer/ramsey/uuid/src/UuidInterface.php @@ -46,7 +46,7 @@ interface UuidInterface extends * * @param UuidInterface $other The UUID to compare * - * @return int -1, 0, or 1 if the UUID is less than, equal to, or greater than $other + * @return int<-1,1> -1, 0, or 1 if the UUID is less than, equal to, or greater than $other */ public function compareTo(UuidInterface $other): int; diff --git a/lam/lib/3rdParty/composer/symfony/http-client/HttplugClient.php b/lam/lib/3rdParty/composer/symfony/http-client/HttplugClient.php index 2d9eec30f..c2fd4635b 100644 --- a/lam/lib/3rdParty/composer/symfony/http-client/HttplugClient.php +++ b/lam/lib/3rdParty/composer/symfony/http-client/HttplugClient.php @@ -101,7 +101,7 @@ public function __construct(HttpClientInterface $client = null, ResponseFactoryI public function sendRequest(RequestInterface $request): Psr7ResponseInterface { try { - return $this->waitLoop->createPsr7Response($this->sendPsr7Request($request)); + return HttplugWaitLoop::createPsr7Response($this->responseFactory, $this->streamFactory, $this->client, $this->sendPsr7Request($request), true); } catch (TransportExceptionInterface $e) { throw new NetworkException($e->getMessage(), $request, $e); } diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Internal/HttplugWaitLoop.php b/lam/lib/3rdParty/composer/symfony/http-client/Internal/HttplugWaitLoop.php index c61be22e3..66bbc4571 100644 --- a/lam/lib/3rdParty/composer/symfony/http-client/Internal/HttplugWaitLoop.php +++ b/lam/lib/3rdParty/composer/symfony/http-client/Internal/HttplugWaitLoop.php @@ -79,7 +79,7 @@ public function wait(?ResponseInterface $pendingResponse, float $maxDuration = n if ([, $promise] = $this->promisePool[$response] ?? null) { unset($this->promisePool[$response]); - $promise->resolve($this->createPsr7Response($response, true)); + $promise->resolve(self::createPsr7Response($this->responseFactory, $this->streamFactory, $this->client, $response, true)); } } catch (\Exception $e) { if ([$request, $promise] = $this->promisePool[$response] ?? null) { @@ -114,9 +114,17 @@ public function wait(?ResponseInterface $pendingResponse, float $maxDuration = n return $count; } - public function createPsr7Response(ResponseInterface $response, bool $buffer = false): Psr7ResponseInterface + public static function createPsr7Response(ResponseFactoryInterface $responseFactory, StreamFactoryInterface $streamFactory, HttpClientInterface $client, ResponseInterface $response, bool $buffer): Psr7ResponseInterface { - $psrResponse = $this->responseFactory->createResponse($response->getStatusCode()); + $responseParameters = [$response->getStatusCode()]; + + foreach ($response->getInfo('response_headers') as $h) { + if (11 <= \strlen($h) && '/' === $h[4] && preg_match('#^HTTP/\d+(?:\.\d+)? (?:\d\d\d) (.+)#', $h, $m)) { + $responseParameters[1] = $m[1]; + } + } + + $psrResponse = $responseFactory->createResponse(...$responseParameters); foreach ($response->getHeaders(false) as $name => $values) { foreach ($values as $value) { @@ -129,11 +137,11 @@ public function createPsr7Response(ResponseInterface $response, bool $buffer = f } if ($response instanceof StreamableInterface) { - $body = $this->streamFactory->createStreamFromResource($response->toStream(false)); + $body = $streamFactory->createStreamFromResource($response->toStream(false)); } elseif (!$buffer) { - $body = $this->streamFactory->createStreamFromResource(StreamWrapper::createResource($response, $this->client)); + $body = $streamFactory->createStreamFromResource(StreamWrapper::createResource($response, $client)); } else { - $body = $this->streamFactory->createStream($response->getContent(false)); + $body = $streamFactory->createStream($response->getContent(false)); } if ($body->isSeekable()) { diff --git a/lam/lib/3rdParty/composer/symfony/http-client/Psr18Client.php b/lam/lib/3rdParty/composer/symfony/http-client/Psr18Client.php index 2ec758ae4..0cd8f7d24 100644 --- a/lam/lib/3rdParty/composer/symfony/http-client/Psr18Client.php +++ b/lam/lib/3rdParty/composer/symfony/http-client/Psr18Client.php @@ -27,10 +27,12 @@ use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UriFactoryInterface; use Psr\Http\Message\UriInterface; +use Symfony\Component\HttpClient\Internal\HttplugWaitLoop; use Symfony\Component\HttpClient\Response\StreamableInterface; use Symfony\Component\HttpClient\Response\StreamWrapper; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; +use Symfony\Contracts\HttpClient\ResponseInterface as HttpClientResponseInterface; use Symfony\Contracts\Service\ResetInterface; if (!interface_exists(RequestFactoryInterface::class)) { @@ -102,26 +104,7 @@ public function sendRequest(RequestInterface $request): ResponseInterface $response = $this->client->request($request->getMethod(), (string) $request->getUri(), $options); - $psrResponse = $this->responseFactory->createResponse($response->getStatusCode()); - - foreach ($response->getHeaders(false) as $name => $values) { - foreach ($values as $value) { - try { - $psrResponse = $psrResponse->withAddedHeader($name, $value); - } catch (\InvalidArgumentException $e) { - // ignore invalid header - } - } - } - - $body = $response instanceof StreamableInterface ? $response->toStream(false) : StreamWrapper::createResource($response, $this->client); - $body = $this->streamFactory->createStreamFromResource($body); - - if ($body->isSeekable()) { - $body->seek(0); - } - - return $psrResponse->withBody($body); + return HttplugWaitLoop::createPsr7Response($this->responseFactory, $this->streamFactory, $this->client, $response, false); } catch (TransportExceptionInterface $e) { if ($e instanceof \InvalidArgumentException) { throw new Psr18RequestException($e, $request);