Upgrade to 4.6.0

This commit is contained in:
Bastian Allgeier
2025-01-30 12:15:44 +01:00
parent d71db84033
commit daf499e2e4
179 changed files with 1848 additions and 688 deletions

View File

@@ -1,5 +0,0 @@
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/yaml-lint
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
php "%BIN_TARGET%" %*

View File

@@ -331,7 +331,7 @@ class SimpleImage
*
* @throws Exception Thrown when WEBP support is not enabled or unsupported format.
*/
public function generate(string $mimeType = null, array|int $options = 100): array
public function generate(string|null $mimeType = null, array|int $options = 100): array
{
// Format defaults to the original mime type
$mimeType = $mimeType ?: $this->mimeType;
@@ -473,7 +473,7 @@ class SimpleImage
*
* @throws Exception
*/
public function toDataUri(string $mimeType = null, array|int $options = 100): string
public function toDataUri(string|null $mimeType = null, array|int $options = 100): string
{
$image = $this->generate($mimeType, $options);
@@ -490,7 +490,7 @@ class SimpleImage
*
* @throws Exception
*/
public function toDownload(string $filename, string $mimeType = null, array|int $options = 100): static
public function toDownload(string $filename, string|null $mimeType = null, array|int $options = 100): static
{
$image = $this->generate($mimeType, $options);
@@ -517,7 +517,7 @@ class SimpleImage
*
* @throws Exception Thrown if failed write to file.
*/
public function toFile(string $file, string $mimeType = null, array|int $options = 100): static
public function toFile(string $file, string|null $mimeType = null, array|int $options = 100): static
{
$image = $this->generate($mimeType, $options);
@@ -538,7 +538,7 @@ class SimpleImage
*
* @throws Exception
*/
public function toScreen(string $mimeType = null, array|int $options = 100): static
public function toScreen(string|null $mimeType = null, array|int $options = 100): static
{
$image = $this->generate($mimeType, $options);
@@ -557,7 +557,7 @@ class SimpleImage
*
* @throws Exception
*/
public function toString(string $mimeType = null, array|int $options = 100): string
public function toString(string|null $mimeType = null, array|int $options = 100): string
{
return $this->generate($mimeType, $options)['data'];
}
@@ -975,7 +975,7 @@ class SimpleImage
* @param int|null $height The new image height.
* @return SimpleImage
*/
public function resize(int $width = null, int $height = null): static
public function resize(int|null $width = null, int|null $height = null): static
{
// No dimensions specified
if (! $width && ! $height) {
@@ -1027,7 +1027,7 @@ class SimpleImage
* @param int|null $res_y The vertical resolution in DPI
* @return SimpleImage
*/
public function resolution(int $res_x, int $res_y = null): static
public function resolution(int $res_x, int|null $res_y = null): static
{
if (is_null($res_y)) {
imageresolution($this->image, $res_x);
@@ -1087,7 +1087,7 @@ class SimpleImage
*
* @throws Exception
*/
public function text(string $text, array $options, array &$boundary = null): static
public function text(string $text, array $options, array|null &$boundary = null): static
{
// Check for freetype support
if (! function_exists('imagettftext')) {
@@ -2196,7 +2196,7 @@ class SimpleImage
*
* @throws Exception Thrown if library \League\ColorExtractor is missing.
*/
public function extractColors(int $count = 5, string|array $backgroundColor = null): array
public function extractColors(int $count = 5, string|array|null $backgroundColor = null): array
{
// Check for required library
if (! class_exists('\\'.ColorExtractor::class)) {

View File

@@ -64,17 +64,17 @@
},
{
"name": "claviska/simpleimage",
"version": "4.2.0",
"version_normalized": "4.2.0.0",
"version": "4.2.1",
"version_normalized": "4.2.1.0",
"source": {
"type": "git",
"url": "https://github.com/claviska/SimpleImage.git",
"reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2"
"reference": "ec6d5021e5a7153a2520d64c59b86b6f3c4157c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/claviska/SimpleImage/zipball/dfbe53c01dae8467468ef2b817c09b786a7839d2",
"reference": "dfbe53c01dae8467468ef2b817c09b786a7839d2",
"url": "https://api.github.com/repos/claviska/SimpleImage/zipball/ec6d5021e5a7153a2520d64c59b86b6f3c4157c5",
"reference": "ec6d5021e5a7153a2520d64c59b86b6f3c4157c5",
"shasum": ""
},
"require": {
@@ -86,7 +86,7 @@
"laravel/pint": "^1.5",
"phpstan/phpstan": "^1.10"
},
"time": "2024-04-15T16:07:16+00:00",
"time": "2024-11-22T13:25:03+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -108,7 +108,7 @@
"description": "A PHP class that makes working with images as simple as possible.",
"support": {
"issues": "https://github.com/claviska/SimpleImage/issues",
"source": "https://github.com/claviska/SimpleImage/tree/4.2.0"
"source": "https://github.com/claviska/SimpleImage/tree/4.2.1"
},
"funding": [
{
@@ -204,17 +204,17 @@
},
{
"name": "filp/whoops",
"version": "2.16.0",
"version_normalized": "2.16.0.0",
"version": "2.17.0",
"version_normalized": "2.17.0.0",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2"
"reference": "075bc0c26631110584175de6523ab3f1652eb28e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/filp/whoops/zipball/befcdc0e5dce67252aa6322d82424be928214fa2",
"reference": "befcdc0e5dce67252aa6322d82424be928214fa2",
"url": "https://api.github.com/repos/filp/whoops/zipball/075bc0c26631110584175de6523ab3f1652eb28e",
"reference": "075bc0c26631110584175de6523ab3f1652eb28e",
"shasum": ""
},
"require": {
@@ -230,7 +230,7 @@
"symfony/var-dumper": "Pretty print complex values better with var-dumper available",
"whoops/soap": "Formats errors as SOAP responses"
},
"time": "2024-09-25T12:00:00+00:00",
"time": "2025-01-25T12:00:00+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -266,7 +266,7 @@
],
"support": {
"issues": "https://github.com/filp/whoops/issues",
"source": "https://github.com/filp/whoops/tree/2.16.0"
"source": "https://github.com/filp/whoops/tree/2.17.0"
},
"funding": [
{
@@ -328,17 +328,17 @@
},
{
"name": "laminas/laminas-escaper",
"version": "2.14.0",
"version_normalized": "2.14.0.0",
"version": "2.15.0",
"version_normalized": "2.15.0.0",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-escaper.git",
"reference": "0f7cb975f4443cf22f33408925c231225cfba8cb"
"reference": "c612b0488ae486284c39885efca494c180f16351"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/0f7cb975f4443cf22f33408925c231225cfba8cb",
"reference": "0f7cb975f4443cf22f33408925c231225cfba8cb",
"url": "https://api.github.com/repos/laminas/laminas-escaper/zipball/c612b0488ae486284c39885efca494c180f16351",
"reference": "c612b0488ae486284c39885efca494c180f16351",
"shasum": ""
},
"require": {
@@ -350,14 +350,14 @@
"zendframework/zend-escaper": "*"
},
"require-dev": {
"infection/infection": "^0.27.9",
"laminas/laminas-coding-standard": "~3.0.0",
"infection/infection": "^0.27.11",
"laminas/laminas-coding-standard": "~3.0.1",
"maglnet/composer-require-checker": "^3.8.0",
"phpunit/phpunit": "^9.6.16",
"phpunit/phpunit": "^9.6.22",
"psalm/plugin-phpunit": "^0.19.0",
"vimeo/psalm": "^5.21.1"
"vimeo/psalm": "^5.26.1"
},
"time": "2024-10-24T10:12:53+00:00",
"time": "2024-12-17T19:39:54+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -514,17 +514,17 @@
},
{
"name": "phpmailer/phpmailer",
"version": "v6.9.2",
"version_normalized": "6.9.2.0",
"version": "v6.9.3",
"version_normalized": "6.9.3.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
"reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c"
"reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a7b17b42fa4887c92146243f3d2f4ccb962af17c",
"reference": "a7b17b42fa4887c92146243f3d2f4ccb962af17c",
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2f5c94fe7493efc213f643c23b1b1c249d40f47e",
"reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e",
"shasum": ""
},
"require": {
@@ -554,7 +554,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": "2024-10-09T10:07:50+00:00",
"time": "2024-11-24T18:04:13+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -586,7 +586,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.9.2"
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3"
},
"funding": [
{
@@ -651,23 +651,23 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.5.0",
"version_normalized": "3.5.0.0",
"version": "v3.5.1",
"version_normalized": "3.5.1.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
"shasum": ""
},
"require": {
"php": ">=8.1"
},
"time": "2024-04-18T09:32:20+00:00",
"time": "2024-09-25T14:20:29+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -701,7 +701,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
},
"funding": [
{
@@ -1056,17 +1056,17 @@
},
{
"name": "symfony/yaml",
"version": "v6.4.13",
"version_normalized": "6.4.13.0",
"version": "v6.4.18",
"version_normalized": "6.4.18.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9"
"reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/e99b4e94d124b29ee4cf3140e1b537d2dad8cec9",
"reference": "e99b4e94d124b29ee4cf3140e1b537d2dad8cec9",
"url": "https://api.github.com/repos/symfony/yaml/zipball/bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5",
"reference": "bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5",
"shasum": ""
},
"require": {
@@ -1080,7 +1080,7 @@
"require-dev": {
"symfony/console": "^5.4|^6.0|^7.0"
},
"time": "2024-09-25T14:18:03+00:00",
"time": "2025-01-07T09:44:41+00:00",
"bin": [
"Resources/bin/yaml-lint"
],
@@ -1111,7 +1111,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v6.4.13"
"source": "https://github.com/symfony/yaml/tree/v6.4.18"
},
"funding": [
{

View File

@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'getkirby/cms',
'pretty_version' => '4.5.0',
'version' => '4.5.0.0',
'reference' => null,
'pretty_version' => '4.6.0',
'version' => '4.6.0.0',
'reference' => NULL,
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -20,9 +20,9 @@
'dev_requirement' => false,
),
'claviska/simpleimage' => array(
'pretty_version' => '4.2.0',
'version' => '4.2.0.0',
'reference' => 'dfbe53c01dae8467468ef2b817c09b786a7839d2',
'pretty_version' => '4.2.1',
'version' => '4.2.1.0',
'reference' => 'ec6d5021e5a7153a2520d64c59b86b6f3c4157c5',
'type' => 'library',
'install_path' => __DIR__ . '/../claviska/simpleimage',
'aliases' => array(),
@@ -38,18 +38,18 @@
'dev_requirement' => false,
),
'filp/whoops' => array(
'pretty_version' => '2.16.0',
'version' => '2.16.0.0',
'reference' => 'befcdc0e5dce67252aa6322d82424be928214fa2',
'pretty_version' => '2.17.0',
'version' => '2.17.0.0',
'reference' => '075bc0c26631110584175de6523ab3f1652eb28e',
'type' => 'library',
'install_path' => __DIR__ . '/../filp/whoops',
'aliases' => array(),
'dev_requirement' => false,
),
'getkirby/cms' => array(
'pretty_version' => '4.5.0',
'version' => '4.5.0.0',
'reference' => null,
'pretty_version' => '4.6.0',
'version' => '4.6.0.0',
'reference' => NULL,
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -65,9 +65,9 @@
'dev_requirement' => false,
),
'laminas/laminas-escaper' => array(
'pretty_version' => '2.14.0',
'version' => '2.14.0.0',
'reference' => '0f7cb975f4443cf22f33408925c231225cfba8cb',
'pretty_version' => '2.15.0',
'version' => '2.15.0.0',
'reference' => 'c612b0488ae486284c39885efca494c180f16351',
'type' => 'library',
'install_path' => __DIR__ . '/../laminas/laminas-escaper',
'aliases' => array(),
@@ -98,9 +98,9 @@
'dev_requirement' => false,
),
'phpmailer/phpmailer' => array(
'pretty_version' => 'v6.9.2',
'version' => '6.9.2.0',
'reference' => 'a7b17b42fa4887c92146243f3d2f4ccb962af17c',
'pretty_version' => 'v6.9.3',
'version' => '6.9.3.0',
'reference' => '2f5c94fe7493efc213f643c23b1b1c249d40f47e',
'type' => 'library',
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
'aliases' => array(),
@@ -116,9 +116,9 @@
'dev_requirement' => false,
),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'v3.5.0',
'version' => '3.5.0.0',
'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1',
'pretty_version' => 'v3.5.1',
'version' => '3.5.1.0',
'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(),
@@ -167,9 +167,9 @@
),
),
'symfony/yaml' => array(
'pretty_version' => 'v6.4.13',
'version' => '6.4.13.0',
'reference' => 'e99b4e94d124b29ee4cf3140e1b537d2dad8cec9',
'pretty_version' => 'v6.4.18',
'version' => '6.4.18.0',
'reference' => 'bf598c9d9bb4a22f495a4e26e4c4fce2f8ecefc5',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/yaml',
'aliases' => array(),

View File

@@ -28,6 +28,7 @@ class PrettyPageHandler extends Handler
const EDITOR_ESPRESSO = "espresso";
const EDITOR_XDEBUG = "xdebug";
const EDITOR_NETBEANS = "netbeans";
const EDITOR_CURSOR = "cursor";
/**
* Search paths to be scanned for resources.
@@ -122,6 +123,7 @@ class PrettyPageHandler extends Handler
"atom" => "atom://core/open/file?filename=%file&line=%line",
"espresso" => "x-espresso://open?filepath=%file&lines=%line",
"netbeans" => "netbeans://open/?f=%file:%line",
"cursor" => "cursor://file/%file:%line",
];
/**

View File

@@ -34,12 +34,12 @@
"ext-mbstring": "*"
},
"require-dev": {
"infection/infection": "^0.27.9",
"laminas/laminas-coding-standard": "~3.0.0",
"infection/infection": "^0.27.11",
"laminas/laminas-coding-standard": "~3.0.1",
"maglnet/composer-require-checker": "^3.8.0",
"phpunit/phpunit": "^9.6.16",
"phpunit/phpunit": "^9.6.22",
"psalm/plugin-phpunit": "^0.19.0",
"vimeo/psalm": "^5.21.1"
"vimeo/psalm": "^5.26.1"
},
"autoload": {
"psr-4": {

View File

@@ -25,6 +25,8 @@ use const ENT_SUBSTITUTE;
/**
* Context specific methods for use in secure output escaping
*
* @final
*/
class Escaper
{
@@ -49,7 +51,7 @@ class Escaper
* Current encoding for escaping. If not UTF-8, we convert strings from this encoding
* pre-escaping and back to this encoding post-escaping.
*
* @var string
* @var non-empty-string
*/
protected $encoding = 'utf-8';
@@ -88,7 +90,7 @@ class Escaper
/**
* List of all encoding supported by this class
*
* @var array
* @var list<non-empty-string>
*/
protected $supportedEncodings = [
'iso-8859-1',
@@ -131,6 +133,7 @@ class Escaper
* Constructor: Single parameter allows setting of global encoding for use by
* the current object.
*
* @param non-empty-string|null $encoding
* @throws Exception\InvalidArgumentException
*/
public function __construct(?string $encoding = null)
@@ -159,25 +162,19 @@ class Escaper
// set matcher callbacks
$this->htmlAttrMatcher =
/** @param array<array-key, string> $matches */
function (array $matches): string {
return $this->htmlAttrMatcher($matches);
};
fn(array $matches): string => $this->htmlAttrMatcher($matches);
$this->jsMatcher =
/** @param array<array-key, string> $matches */
function (array $matches): string {
return $this->jsMatcher($matches);
};
fn(array $matches): string => $this->jsMatcher($matches);
$this->cssMatcher =
/** @param array<array-key, string> $matches */
function (array $matches): string {
return $this->cssMatcher($matches);
};
fn(array $matches): string => $this->cssMatcher($matches);
}
/**
* Return the encoding that all output/input is expected to be encoded in.
*
* @return string
* @return non-empty-string
*/
public function getEncoding()
{
@@ -188,7 +185,7 @@ class Escaper
* Escape a string for the HTML Body context where there are very few characters
* of special meaning. Internally this will use htmlspecialchars().
*
* @return string
* @return ($string is non-empty-string ? non-empty-string : string)
*/
public function escapeHtml(string $string)
{
@@ -200,7 +197,7 @@ class Escaper
* to escape that are not covered by htmlspecialchars() to cover cases where an attribute
* might be unquoted or quoted illegally (e.g. backticks are valid quotes for IE).
*
* @return string
* @return ($string is non-empty-string ? non-empty-string : string)
*/
public function escapeHtmlAttr(string $string)
{
@@ -222,7 +219,7 @@ class Escaper
* Backslash escaping is not used as it still leaves the escaped character as-is and so
* is not useful in a HTML context.
*
* @return string
* @return ($string is non-empty-string ? non-empty-string : string)
*/
public function escapeJs(string $string)
{
@@ -240,7 +237,7 @@ class Escaper
* an entire URI - only a subcomponent being inserted. The function is a simple proxy
* to rawurlencode() which now implements RFC 3986 since PHP 5.3 completely.
*
* @return string
* @return ($string is non-empty-string ? non-empty-string : string)
*/
public function escapeUrl(string $string)
{
@@ -251,7 +248,7 @@ class Escaper
* Escape a string for the CSS context. CSS escaping can be applied to any string being
* inserted into CSS and escapes everything except alphanumerics.
*
* @return string
* @return ($string is non-empty-string ? non-empty-string : string)
*/
public function escapeCss(string $string)
{

View File

@@ -253,7 +253,7 @@ class PHPMailer
* You can set your own, but it must be in the format "<id@domain>",
* as defined in RFC5322 section 3.6.4 or it will be ignored.
*
* @see https://tools.ietf.org/html/rfc5322#section-3.6.4
* @see https://www.rfc-editor.org/rfc/rfc5322#section-3.6.4
*
* @var string
*/
@@ -387,7 +387,7 @@ class PHPMailer
* 'DELAY' will notify you if there is an unusual delay in delivery, but the actual
* delivery's outcome (success or failure) is not yet decided.
*
* @see https://tools.ietf.org/html/rfc3461 See section 4.1 for more information about NOTIFY
* @see https://www.rfc-editor.org/rfc/rfc3461.html#section-4.1 for more information about NOTIFY
*/
public $dsn = '';
@@ -756,7 +756,7 @@ class PHPMailer
*
* @var string
*/
const VERSION = '6.9.2';
const VERSION = '6.9.3';
/**
* Error severity: message only, continue processing.
@@ -1871,7 +1871,7 @@ class PHPMailer
*/
protected static function isPermittedPath($path)
{
//Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1
//Matches scheme definition from https://www.rfc-editor.org/rfc/rfc3986#section-3.1
return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path);
}
@@ -2705,7 +2705,7 @@ class PHPMailer
}
//Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
//https://tools.ietf.org/html/rfc5322#section-3.6.4
//https://www.rfc-editor.org/rfc/rfc5322#section-3.6.4
if (
'' !== $this->MessageID &&
preg_match(
@@ -4910,7 +4910,7 @@ class PHPMailer
* Uses the 'relaxed' algorithm from RFC6376 section 3.4.2.
* Canonicalized headers should *always* use CRLF, regardless of mailer setting.
*
* @see https://tools.ietf.org/html/rfc6376#section-3.4.2
* @see https://www.rfc-editor.org/rfc/rfc6376#section-3.4.2
*
* @param string $signHeader Header
*
@@ -4922,7 +4922,7 @@ class PHPMailer
$signHeader = static::normalizeBreaks($signHeader, self::CRLF);
//Unfold header lines
//Note PCRE \s is too broad a definition of whitespace; RFC5322 defines it as `[ \t]`
//@see https://tools.ietf.org/html/rfc5322#section-2.2
//@see https://www.rfc-editor.org/rfc/rfc5322#section-2.2
//That means this may break if you do something daft like put vertical tabs in your headers.
$signHeader = preg_replace('/\r\n[ \t]+/', ' ', $signHeader);
//Break headers out into an array
@@ -4954,7 +4954,7 @@ class PHPMailer
* Uses the 'simple' algorithm from RFC6376 section 3.4.3.
* Canonicalized bodies should *always* use CRLF, regardless of mailer setting.
*
* @see https://tools.ietf.org/html/rfc6376#section-3.4.3
* @see https://www.rfc-editor.org/rfc/rfc6376#section-3.4.3
*
* @param string $body Message Body
*
@@ -4990,7 +4990,7 @@ class PHPMailer
$DKIMquery = 'dns/txt'; //Query method
$DKIMtime = time();
//Always sign these headers without being asked
//Recommended list from https://tools.ietf.org/html/rfc6376#section-5.4.1
//Recommended list from https://www.rfc-editor.org/rfc/rfc6376#section-5.4.1
$autoSignHeaders = [
'from',
'to',
@@ -5096,7 +5096,7 @@ class PHPMailer
}
//The DKIM-Signature header is included in the signature *except for* the value of the `b` tag
//which is appended after calculating the signature
//https://tools.ietf.org/html/rfc6376#section-3.5
//https://www.rfc-editor.org/rfc/rfc6376#section-3.5
$dkimSignatureHeader = 'DKIM-Signature: v=1;' .
' d=' . $this->DKIM_domain . ';' .
' s=' . $this->DKIM_selector . ';' . static::$LE .

View File

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

View File

@@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
const VERSION = '6.9.2';
const VERSION = '6.9.3';
/**
* SMTP line break constant.
@@ -62,7 +62,7 @@ class SMTP
* The maximum line length allowed by RFC 5321 section 4.5.3.1.6,
* *excluding* a trailing CRLF break.
*
* @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6
* @see https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.6
*
* @var int
*/
@@ -72,7 +72,7 @@ class SMTP
* The maximum line length allowed for replies in RFC 5321 section 4.5.3.1.5,
* *including* a trailing CRLF line break.
*
* @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.5
* @see https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.5
*
* @var int
*/
@@ -373,7 +373,7 @@ class SMTP
}
//Anything other than a 220 response means something went wrong
//RFC 5321 says the server will wait for us to send a QUIT in response to a 554 error
//https://tools.ietf.org/html/rfc5321#section-3.1
//https://www.rfc-editor.org/rfc/rfc5321#section-3.1
if ($responseCode === 554) {
$this->quit();
}
@@ -582,7 +582,7 @@ class SMTP
}
//Send encoded username and password
if (
//Format from https://tools.ietf.org/html/rfc4616#section-2
//Format from https://www.rfc-editor.org/rfc/rfc4616#section-2
//We skip the first field (it's forgery), so the string starts with a null byte
!$this->sendCommand(
'User & Password',
@@ -795,7 +795,7 @@ class SMTP
//Send the lines to the server
foreach ($lines_out as $line_out) {
//Dot-stuffing as per RFC5321 section 4.5.2
//https://tools.ietf.org/html/rfc5321#section-4.5.2
//https://www.rfc-editor.org/rfc/rfc5321#section-4.5.2
if (!empty($line_out) && $line_out[0] === '.') {
$line_out = '.' . $line_out;
}

View File

@@ -1158,7 +1158,7 @@ class Parser
private function lexUnquotedString(int &$cursor): string
{
$offset = $cursor;
$cursor += strcspn($this->currentLine, '[]{},: ', $cursor);
$cursor += strcspn($this->currentLine, '[]{},:', $cursor);
if ($cursor === $offset) {
throw new ParseException('Malformed unquoted YAML string.');
@@ -1167,17 +1167,17 @@ class Parser
return substr($this->currentLine, $offset, $cursor - $offset);
}
private function lexInlineMapping(int &$cursor = 0): string
private function lexInlineMapping(int &$cursor = 0, bool $consumeUntilEol = true): string
{
return $this->lexInlineStructure($cursor, '}');
return $this->lexInlineStructure($cursor, '}', $consumeUntilEol);
}
private function lexInlineSequence(int &$cursor = 0): string
private function lexInlineSequence(int &$cursor = 0, bool $consumeUntilEol = true): string
{
return $this->lexInlineStructure($cursor, ']');
return $this->lexInlineStructure($cursor, ']', $consumeUntilEol);
}
private function lexInlineStructure(int &$cursor, string $closingTag): string
private function lexInlineStructure(int &$cursor, string $closingTag, bool $consumeUntilEol = true): string
{
$value = $this->currentLine[$cursor];
++$cursor;
@@ -1197,15 +1197,19 @@ class Parser
++$cursor;
break;
case '{':
$value .= $this->lexInlineMapping($cursor);
$value .= $this->lexInlineMapping($cursor, false);
break;
case '[':
$value .= $this->lexInlineSequence($cursor);
$value .= $this->lexInlineSequence($cursor, false);
break;
case $closingTag:
$value .= $this->currentLine[$cursor];
++$cursor;
if ($consumeUntilEol && isset($this->currentLine[$cursor]) && ($whitespaces = strspn($this->currentLine, ' ', $cursor) + $cursor) < strlen($this->currentLine) && '#' !== $this->currentLine[$whitespaces]) {
throw new ParseException(sprintf('Unexpected token "%s".', trim(substr($this->currentLine, $cursor))));
}
return $value;
case '#':
break 2;