diff --git a/composer.json b/composer.json index 018570f4a..a293b432c 100644 --- a/composer.json +++ b/composer.json @@ -11,13 +11,13 @@ "algo26-matthias/idna-convert": "^v4.0.2", "enshrined/svg-sanitize": "^0.19.0", "netcarver/textile": "v4.1.1", - "league/commonmark": "^2.5.1", + "league/commonmark": "^2.5.3", "ezyang/htmlpurifier": "^v4.17.0", "openpsa/universalfeedcreator": "^v1.9.0", "phpmailer/phpmailer": "^v6.9.1", "phpoffice/phpspreadsheet": "^2.2.0", "simplepie/simplepie": "@dev", - "html2text/html2text": "^4.3.1", + "html2text/html2text": "^4.3.2", "php81_bc/strftime": "^0.7.5", "symfony/polyfill-php72": "v1.30.0", "symfony/polyfill-php73": "v1.30.0", diff --git a/include/config/dist.conf.inc.php b/include/config/dist.conf.inc.php index 6e9b386aa..4dcdebffe 100644 --- a/include/config/dist.conf.inc.php +++ b/include/config/dist.conf.inc.php @@ -169,7 +169,5 @@ $phpwcms['SMTP_SECURE'] = ''; // secure connection, phpMailer options: '', 'ssl' or 'tls' $phpwcms['SMTP_AUTH'] = 0; // SMTP authentication, ON=1/OFF=0 $phpwcms['SMTP_AUTH_TYPE'] = ''; // sets SMTP auth type: LOGIN (default), PLAIN, NTLM, CRAM-MD5 -$phpwcms['SMTP_REALM'] = ''; // SMTP realm, used for NTLM auth type -$phpwcms['SMTP_WORKSTATION'] = ''; // SMTP workstation, used for NTLM auth type define('PHPWCMS_INCLUDE_CHECK', true); diff --git a/include/inc_act/act_formmailer.php b/include/inc_act/act_formmailer.php index a671ea0ca..61ed51ce2 100644 --- a/include/inc_act/act_formmailer.php +++ b/include/inc_act/act_formmailer.php @@ -307,14 +307,6 @@ function phpwcms_form_encode($in_str, $charset) { } if(!empty($phpwcms['SMTP_AUTH_TYPE'])) { $mail->AuthType = $phpwcms['SMTP_AUTH_TYPE']; - if($phpwcms['SMTP_AUTH_TYPE'] === 'NTLM') { - if(!empty($phpwcms['SMTP_REALM'])) { - $mail->Realm = $phpwcms['SMTP_REALM']; - } - if(!empty($phpwcms['SMTP_WORKSTATION'])) { - $mail->Workstation = $phpwcms['SMTP_WORKSTATION']; - } - } } $mail->SMTPKeepAlive = true; $mail->CharSet = $phpwcms["charset"]; diff --git a/include/inc_act/act_sendnewsletter.php b/include/inc_act/act_sendnewsletter.php index d14f37646..91173216e 100644 --- a/include/inc_act/act_sendnewsletter.php +++ b/include/inc_act/act_sendnewsletter.php @@ -172,14 +172,6 @@ } if(!empty($phpwcms['SMTP_AUTH_TYPE'])) { $mail->AuthType = $phpwcms['SMTP_AUTH_TYPE']; - if($phpwcms['SMTP_AUTH_TYPE'] == 'NTLM') { - if(!empty($phpwcms['SMTP_REALM'])) { - $mail->Realm = $phpwcms['SMTP_REALM']; - } - if(!empty($phpwcms['SMTP_WORKSTATION'])) { - $mail->Workstation = $phpwcms['SMTP_WORKSTATION']; - } - } } $mail->setFrom($newsletter['newsletter_vars']['from_email'], $newsletter['newsletter_vars']['from_name']); diff --git a/include/inc_front/content/cnt12.article.inc.php b/include/inc_front/content/cnt12.article.inc.php index dfc3a1526..d0ba759ba 100644 --- a/include/inc_front/content/cnt12.article.inc.php +++ b/include/inc_front/content/cnt12.article.inc.php @@ -215,14 +215,6 @@ } if(!empty($phpwcms['SMTP_AUTH_TYPE'])) { $mail->AuthType = $phpwcms['SMTP_AUTH_TYPE']; - if($phpwcms['SMTP_AUTH_TYPE'] === 'NTLM') { - if(!empty($phpwcms['SMTP_REALM'])) { - $mail->Realm = $phpwcms['SMTP_REALM']; - } - if(!empty($phpwcms['SMTP_WORKSTATION'])) { - $mail->Workstation = $phpwcms['SMTP_WORKSTATION']; - } - } } $mail->SMTPKeepAlive = false; $mail->CharSet = $phpwcms["charset"]; diff --git a/include/inc_front/content/cnt16.article.inc.php b/include/inc_front/content/cnt16.article.inc.php index 2712a33ec..27cead697 100644 --- a/include/inc_front/content/cnt16.article.inc.php +++ b/include/inc_front/content/cnt16.article.inc.php @@ -93,14 +93,6 @@ } if(!empty($phpwcms['SMTP_AUTH_TYPE'])) { $ecard["mailer"]->AuthType = $phpwcms['SMTP_AUTH_TYPE']; - if($phpwcms['SMTP_AUTH_TYPE'] === 'NTLM') { - if(!empty($phpwcms['SMTP_REALM'])) { - $ecard["mailer"]->Realm = $phpwcms['SMTP_REALM']; - } - if(!empty($phpwcms['SMTP_WORKSTATION'])) { - $ecard["mailer"]->Workstation = $phpwcms['SMTP_WORKSTATION']; - } - } } if($phpwcms['default_lang'] && $phpwcms['default_lang'] !== 'en') { diff --git a/include/inc_front/content/cnt23.article.inc.php b/include/inc_front/content/cnt23.article.inc.php index 753a37e16..88ed6ae80 100644 --- a/include/inc_front/content/cnt23.article.inc.php +++ b/include/inc_front/content/cnt23.article.inc.php @@ -2010,9 +2010,7 @@ // get email addresses of recipients and senders $cnt_form["target"] = convertStringToArray($cnt_form["target"], ';'); if(empty($cnt_form["subject"])) { - $cnt_form["alt_subj"] = str_replace('http://', '', $phpwcms['site']); - $cnt_form["alt_subj"] = substr($cnt_form["alt_subj"], 0, trim($phpwcms['site'], '/')); - $cnt_form["subject"] = 'Webform: '.$cnt_form["alt_subj"]; + $cnt_form["subject"] = 'Webform: ' . parse_url($phpwcms['site'], PHP_URL_HOST); } // check for BCC Addresses @@ -2075,14 +2073,6 @@ } if(!empty($phpwcms['SMTP_AUTH_TYPE'])) { $mail->AuthType = $phpwcms['SMTP_AUTH_TYPE']; - if($phpwcms['SMTP_AUTH_TYPE'] === 'NTLM') { - if(!empty($phpwcms['SMTP_REALM'])) { - $mail->Realm = $phpwcms['SMTP_REALM']; - } - if(!empty($phpwcms['SMTP_WORKSTATION'])) { - $mail->Workstation = $phpwcms['SMTP_WORKSTATION']; - } - } } $mail->CharSet = $phpwcms["charset"]; @@ -2139,14 +2129,6 @@ } if(!empty($phpwcms['SMTP_AUTH_TYPE'])) { $mail->AuthType = $phpwcms['SMTP_AUTH_TYPE']; - if($phpwcms['SMTP_AUTH_TYPE'] === 'NTLM') { - if(!empty($phpwcms['SMTP_REALM'])) { - $mail->Realm = $phpwcms['SMTP_REALM']; - } - if(!empty($phpwcms['SMTP_WORKSTATION'])) { - $mail->Workstation = $phpwcms['SMTP_WORKSTATION']; - } - } } $mail->CharSet = $phpwcms["charset"]; diff --git a/include/inc_lib/general.inc.php b/include/inc_lib/general.inc.php index f71bc93da..251c2e017 100755 --- a/include/inc_lib/general.inc.php +++ b/include/inc_lib/general.inc.php @@ -845,14 +845,6 @@ function sendEmail($data = array( } if (!empty($phpwcms['SMTP_AUTH_TYPE'])) { $mail->AuthType = $phpwcms['SMTP_AUTH_TYPE']; - if ($phpwcms['SMTP_AUTH_TYPE'] === 'NTLM') { - if (!empty($phpwcms['SMTP_REALM'])) { - $mail->Realm = $phpwcms['SMTP_REALM']; - } - if (!empty($phpwcms['SMTP_WORKSTATION'])) { - $mail->Workstation = $phpwcms['SMTP_WORKSTATION']; - } - } } $mail->CharSet = $phpwcms["charset"]; $mail->isHTML($data['isHTML']); diff --git a/include/inc_lib/revision/revision.php b/include/inc_lib/revision/revision.php index 80ef0f678..895beb1e4 100644 --- a/include/inc_lib/revision/revision.php +++ b/include/inc_lib/revision/revision.php @@ -9,6 +9,6 @@ * **/ -const PHPWCMS_VERSION = '1.10.5'; -const PHPWCMS_RELEASE_DATE = '2024/08/10'; +const PHPWCMS_VERSION = '1.10.6'; +const PHPWCMS_RELEASE_DATE = '2024/08/24'; const PHPWCMS_REVISION = '554'; diff --git a/include/vendor/composer/autoload_psr4.php b/include/vendor/composer/autoload_psr4.php index d97e4a3e6..0b10a5934 100644 --- a/include/vendor/composer/autoload_psr4.php +++ b/include/vendor/composer/autoload_psr4.php @@ -25,7 +25,7 @@ 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), 'League\\Config\\' => array($vendorDir . '/league/config/src'), 'League\\CommonMark\\' => array($vendorDir . '/league/commonmark/src'), - 'Html2Text\\' => array($vendorDir . '/html2text/html2text/src', $vendorDir . '/html2text/html2text/test'), + 'Html2Text\\' => array($vendorDir . '/html2text/html2text/src'), 'Dflydev\\DotAccessData\\' => array($vendorDir . '/dflydev/dot-access-data/src'), 'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'), 'Algo26\\IdnaConvert\\' => array($vendorDir . '/algo26-matthias/idna-convert/src'), diff --git a/include/vendor/composer/autoload_static.php b/include/vendor/composer/autoload_static.php index 4c73f01ec..499685cdd 100644 --- a/include/vendor/composer/autoload_static.php +++ b/include/vendor/composer/autoload_static.php @@ -160,7 +160,6 @@ class ComposerStaticInit4b55c751baaf47512d22ca0465e5183a 'Html2Text\\' => array ( 0 => __DIR__ . '/..' . '/html2text/html2text/src', - 1 => __DIR__ . '/..' . '/html2text/html2text/test', ), 'Dflydev\\DotAccessData\\' => array ( diff --git a/include/vendor/composer/installed.json b/include/vendor/composer/installed.json index 3c72d221a..ab11226d3 100644 --- a/include/vendor/composer/installed.json +++ b/include/vendor/composer/installed.json @@ -251,35 +251,32 @@ }, { "name": "html2text/html2text", - "version": "4.3.1", - "version_normalized": "4.3.1.0", + "version": "4.3.2", + "version_normalized": "4.3.2.0", "source": { "type": "git", "url": "https://github.com/mtibben/html2text.git", - "reference": "61ad68e934066a6f8df29a3d23a6460536d0855c" + "reference": "3b443cbe302b52eb5806a21a9dbd79524203970a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mtibben/html2text/zipball/61ad68e934066a6f8df29a3d23a6460536d0855c", - "reference": "61ad68e934066a6f8df29a3d23a6460536d0855c", + "url": "https://api.github.com/repos/mtibben/html2text/zipball/3b443cbe302b52eb5806a21a9dbd79524203970a", + "reference": "3b443cbe302b52eb5806a21a9dbd79524203970a", "shasum": "" }, "require-dev": { - "phpunit/phpunit": "~4" + "phpunit/phpunit": "~4|^9.0" }, "suggest": { "ext-mbstring": "For best performance", "symfony/polyfill-mbstring": "If you can't install ext-mbstring" }, - "time": "2020-04-16T23:44:31+00:00", + "time": "2024-08-20T02:43:29+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { - "Html2Text\\": [ - "src/", - "test/" - ] + "Html2Text\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -289,7 +286,7 @@ "description": "Converts HTML to formatted plain text", "support": { "issues": "https://github.com/mtibben/html2text/issues", - "source": "https://github.com/mtibben/html2text/tree/4.3.1" + "source": "https://github.com/mtibben/html2text/tree/4.3.2" }, "install-path": "../html2text/html2text" }, @@ -335,17 +332,17 @@ }, { "name": "league/commonmark", - "version": "2.5.1", - "version_normalized": "2.5.1.0", + "version": "2.5.3", + "version_normalized": "2.5.3.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c" + "reference": "b650144166dfa7703e62a22e493b853b58d874b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/ac815920de0eff6de947eac0a6a94e5ed0fb147c", - "reference": "ac815920de0eff6de947eac0a6a94e5ed0fb147c", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/b650144166dfa7703e62a22e493b853b58d874b0", + "reference": "b650144166dfa7703e62a22e493b853b58d874b0", "shasum": "" }, "require": { @@ -358,8 +355,8 @@ }, "require-dev": { "cebe/markdown": "^1.0", - "commonmark/cmark": "0.31.0", - "commonmark/commonmark.js": "0.31.0", + "commonmark/cmark": "0.31.1", + "commonmark/commonmark.js": "0.31.1", "composer/package-versions-deprecated": "^1.8", "embed/embed": "^4.4", "erusev/parsedown": "^1.0", @@ -378,7 +375,7 @@ "suggest": { "symfony/yaml": "v2.3+ required if using the Front Matter extension" }, - "time": "2024-07-24T12:52:09+00:00", + "time": "2024-08-16T11:46:16+00:00", "type": "library", "extra": { "branch-alias": { diff --git a/include/vendor/composer/installed.php b/include/vendor/composer/installed.php index d8c85525c..6efbd9d05 100644 --- a/include/vendor/composer/installed.php +++ b/include/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => '__root__', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'c15e9b374627d21665a4e18437d7ef86e1a4cfe2', + 'reference' => '27130a1dd432e3359f4ef3a9db911f7f7660e1d8', 'type' => 'library', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), @@ -13,7 +13,7 @@ '__root__' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => 'c15e9b374627d21665a4e18437d7ef86e1a4cfe2', + 'reference' => '27130a1dd432e3359f4ef3a9db911f7f7660e1d8', 'type' => 'library', 'install_path' => __DIR__ . '/../../../', 'aliases' => array(), @@ -56,9 +56,9 @@ 'dev_requirement' => false, ), 'html2text/html2text' => array( - 'pretty_version' => '4.3.1', - 'version' => '4.3.1.0', - 'reference' => '61ad68e934066a6f8df29a3d23a6460536d0855c', + 'pretty_version' => '4.3.2', + 'version' => '4.3.2.0', + 'reference' => '3b443cbe302b52eb5806a21a9dbd79524203970a', 'type' => 'library', 'install_path' => __DIR__ . '/../html2text/html2text', 'aliases' => array(), @@ -74,9 +74,9 @@ 'dev_requirement' => false, ), 'league/commonmark' => array( - 'pretty_version' => '2.5.1', - 'version' => '2.5.1.0', - 'reference' => 'ac815920de0eff6de947eac0a6a94e5ed0fb147c', + 'pretty_version' => '2.5.3', + 'version' => '2.5.3.0', + 'reference' => 'b650144166dfa7703e62a22e493b853b58d874b0', 'type' => 'library', 'install_path' => __DIR__ . '/../league/commonmark', 'aliases' => array(), diff --git a/include/vendor/html2text/html2text/.github/workflows/ci.yml b/include/vendor/html2text/html2text/.github/workflows/ci.yml new file mode 100644 index 000000000..53ba5da5f --- /dev/null +++ b/include/vendor/html2text/html2text/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI Tests +on: [push, pull_request] + +jobs: + PHPUnit: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + php: + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - 7.3 + - 7.4 + - 8.0 + - 8.1 + - 8.2 + - 8.3 + - 8.4 + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Install dependencies + run: composer install + + - name: Run PHPUnit + run: vendor/bin/phpunit diff --git a/include/vendor/html2text/html2text/.travis.yml b/include/vendor/html2text/html2text/.travis.yml deleted file mode 100644 index e9087914c..000000000 --- a/include/vendor/html2text/html2text/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: php - -matrix: - include: - - php: 5.3 - dist: precise - - php: 5.4 - dist: trusty - - php: 5.5 - dist: trusty - - php: 5.6 - - php: 7.0 - - php: 7.1 - - php: 7.2 - - php: 7.3 - -before_script: - - composer install diff --git a/include/vendor/html2text/html2text/README.md b/include/vendor/html2text/html2text/README.md index e66da7b18..cb619b3fa 100644 --- a/include/vendor/html2text/html2text/README.md +++ b/include/vendor/html2text/html2text/README.md @@ -2,7 +2,7 @@ A PHP library for converting HTML to formatted plain text. -[![Build Status](https://travis-ci.org/mtibben/html2text.png?branch=master)](https://travis-ci.org/mtibben/html2text) +[![Build status](https://github.com/mtibben/html2text/actions/workflows/ci.yml/badge.svg)](https://github.com/mtibben/html2text/actions/workflows/ci.yml) ## Installing diff --git a/include/vendor/html2text/html2text/composer.json b/include/vendor/html2text/html2text/composer.json index ab76efed5..7cfb7fe10 100644 --- a/include/vendor/html2text/html2text/composer.json +++ b/include/vendor/html2text/html2text/composer.json @@ -4,13 +4,20 @@ "type": "library", "license": "GPL-2.0-or-later", "autoload": { - "psr-4": { "Html2Text\\": ["src/", "test/"] } + "psr-4": { + "Html2Text\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Html2Text\\": "test/" + } }, "require-dev": { - "phpunit/phpunit": "~4" + "phpunit/phpunit": "~4|^9.0" }, "suggest": { "ext-mbstring": "For best performance", "symfony/polyfill-mbstring": "If you can't install ext-mbstring" } -} +} \ No newline at end of file diff --git a/include/vendor/html2text/html2text/phpunit.xml.dist b/include/vendor/html2text/html2text/phpunit.xml.dist index 17beecab1..363c9e286 100644 --- a/include/vendor/html2text/html2text/phpunit.xml.dist +++ b/include/vendor/html2text/html2text/phpunit.xml.dist @@ -6,7 +6,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" bootstrap="test/bootstrap.php" > diff --git a/include/vendor/html2text/html2text/src/Html2Text.php b/include/vendor/html2text/html2text/src/Html2Text.php index 9fd912359..6e0f9e50e 100644 --- a/include/vendor/html2text/html2text/src/Html2Text.php +++ b/include/vendor/html2text/html2text/src/Html2Text.php @@ -236,16 +236,19 @@ private function legacyConstruct($html = '', $fromFile = false, array $options = */ public function __construct($html = '', $options = array()) { + $this->htmlFuncFlags = (PHP_VERSION_ID < 50400) + ? ENT_QUOTES + : ENT_QUOTES | ENT_HTML5; + // for backwards compatibility if (!is_array($options)) { - return call_user_func_array(array($this, 'legacyConstruct'), func_get_args()); + // phpcs:ignore (PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection + call_user_func_array(array($this, 'legacyConstruct'), func_get_args()); + return; } $this->html = $html; $this->options = array_merge($this->options, $options); - $this->htmlFuncFlags = (PHP_VERSION_ID < 50400) - ? ENT_COMPAT - : ENT_COMPAT | ENT_HTML5; } /** @@ -351,7 +354,11 @@ protected function doConvert() { $this->linkList = array(); - $text = trim($this->html); + if ($this->html === null) { + $text = ''; + } else { + $text = trim($this->html); + } $this->converter($text); @@ -389,6 +396,9 @@ protected function converter(&$text) $text = preg_replace("/[\n]{3,}/", "\n\n", $text); // remove leading empty lines (can be produced by eg. P tag on the beginning) + if ($text === null) { + $text = ''; + } $text = ltrim($text, "\n"); if ($this->options['width'] > 0) { @@ -417,7 +427,7 @@ protected function buildlinkList($link, $display, $linkOverride = null) } // Ignored link types - if (preg_match('!^(javascript:|mailto:|#)!i', html_entity_decode($link))) { + if (preg_match('!^(javascript:|mailto:|#)!i', html_entity_decode($link, $this->htmlFuncFlags, self::ENCODING))) { return $display; } diff --git a/include/vendor/league/commonmark/CHANGELOG.md b/include/vendor/league/commonmark/CHANGELOG.md index dbb932254..917e5e80c 100644 --- a/include/vendor/league/commonmark/CHANGELOG.md +++ b/include/vendor/league/commonmark/CHANGELOG.md @@ -6,6 +6,23 @@ Updates should follow the [Keep a CHANGELOG](https://keepachangelog.com/) princi ## [Unreleased][unreleased] +## [2.5.3] - 2024-08-16 + +### Changed + +- Made compatible with CommonMark spec 0.31.1, including: + - Remove `source`, add `search` to list of recognized block tags + +## [2.5.2] - 2024-08-14 + +### Changed + +- Boolean attributes now require an explicit `true` value (#1040) + +### Fixed + +- Fixed regression where text could be misinterpreted as an attribute (#1040) + ## [2.5.1] - 2024-07-24 ### Fixed @@ -614,8 +631,10 @@ No changes were introduced since the previous release. - Alternative 1: Use `CommonMarkConverter` or `GithubFlavoredMarkdownConverter` if you don't need to customize the environment - Alternative 2: Instantiate a new `Environment` and add the necessary extensions yourself -[unreleased]: https://github.com/thephpleague/commonmark/compare/2.5.1....main -[2.5.1]: https://github.com/thephpleague/commonmark/compare/2.5.0....2.5.1 +[unreleased]: https://github.com/thephpleague/commonmark/compare/2.5.3...main +[2.5.3]: https://github.com/thephpleague/commonmark/compare/2.5.2...2.5.3 +[2.5.2]: https://github.com/thephpleague/commonmark/compare/2.5.1...2.5.2 +[2.5.1]: https://github.com/thephpleague/commonmark/compare/2.5.0...2.5.1 [2.5.0]: https://github.com/thephpleague/commonmark/compare/2.4.4...2.5.0 [2.4.4]: https://github.com/thephpleague/commonmark/compare/2.4.3...2.4.4 [2.4.3]: https://github.com/thephpleague/commonmark/compare/2.4.2...2.4.3 diff --git a/include/vendor/league/commonmark/composer.json b/include/vendor/league/commonmark/composer.json index 0dd28291b..9b9066203 100644 --- a/include/vendor/league/commonmark/composer.json +++ b/include/vendor/league/commonmark/composer.json @@ -31,8 +31,8 @@ "require-dev": { "ext-json": "*", "cebe/markdown": "^1.0", - "commonmark/cmark": "0.31.0", - "commonmark/commonmark.js": "0.31.0", + "commonmark/cmark": "0.31.1", + "commonmark/commonmark.js": "0.31.1", "composer/package-versions-deprecated": "^1.8", "embed/embed": "^4.4", "erusev/parsedown": "^1.0", @@ -56,9 +56,9 @@ "type": "package", "package": { "name": "commonmark/commonmark.js", - "version": "0.31.0", + "version": "0.31.1", "dist": { - "url": "https://github.com/commonmark/commonmark.js/archive/0.31.0.zip", + "url": "https://github.com/commonmark/commonmark.js/archive/0.31.1.zip", "type": "zip" } } @@ -67,9 +67,9 @@ "type": "package", "package": { "name": "commonmark/cmark", - "version": "0.31.0", + "version": "0.31.1", "dist": { - "url": "https://github.com/commonmark/cmark/archive/0.31.0.zip", + "url": "https://github.com/commonmark/cmark/archive/0.31.1.zip", "type": "zip" } } diff --git a/include/vendor/league/commonmark/src/Extension/Attributes/Util/AttributesHelper.php b/include/vendor/league/commonmark/src/Extension/Attributes/Util/AttributesHelper.php index 5fbbdea1c..d13a565ef 100644 --- a/include/vendor/league/commonmark/src/Extension/Attributes/Util/AttributesHelper.php +++ b/include/vendor/league/commonmark/src/Extension/Attributes/Util/AttributesHelper.php @@ -23,8 +23,8 @@ */ final class AttributesHelper { - private const SINGLE_ATTRIBUTE = '\s*([.]-?[_a-z][^\s}]*|[#][^\s}]+|' . RegexHelper::PARTIAL_ATTRIBUTENAME . RegexHelper::PARTIAL_ATTRIBUTEVALUESPEC . '?)\s*'; - private const ATTRIBUTE_LIST = '/^{:?(' . self::SINGLE_ATTRIBUTE . ')+}(?!})/i'; + private const SINGLE_ATTRIBUTE = '\s*([.]-?[_a-z][^\s}]*|[#][^\s}]+|' . RegexHelper::PARTIAL_ATTRIBUTENAME . RegexHelper::PARTIAL_ATTRIBUTEVALUESPEC . ')\s*'; + private const ATTRIBUTE_LIST = '/^{:?(' . self::SINGLE_ATTRIBUTE . ')+}/i'; /** * @return array @@ -72,15 +72,14 @@ public static function parseAttributes(Cursor $cursor): array continue; } - $parts = \explode('=', $attribute, 2); - if (\count($parts) === 1) { - $attributes[$attribute] = true; + /** @psalm-suppress PossiblyUndefinedArrayOffset */ + [$name, $value] = \explode('=', $attribute, 2); + + if ($value === 'true') { + $attributes[$name] = true; continue; } - /** @psalm-suppress PossiblyUndefinedArrayOffset */ - [$name, $value] = $parts; - $first = $value[0]; $last = \substr($value, -1); if (($first === '"' && $last === '"') || ($first === "'" && $last === "'") && \strlen($value) > 1) { diff --git a/include/vendor/league/commonmark/src/Util/RegexHelper.php b/include/vendor/league/commonmark/src/Util/RegexHelper.php index cab073d7f..a89e7bda6 100644 --- a/include/vendor/league/commonmark/src/Util/RegexHelper.php +++ b/include/vendor/league/commonmark/src/Util/RegexHelper.php @@ -41,7 +41,7 @@ final class RegexHelper public const PARTIAL_REG_CHAR = '[^\\\\()\x00-\x20]'; public const PARTIAL_IN_PARENS_NOSP = '\((' . self::PARTIAL_REG_CHAR . '|' . self::PARTIAL_ESCAPED_CHAR . '|\\\\)*\)'; public const PARTIAL_TAGNAME = '[a-z][a-z0-9-]*'; - public const PARTIAL_BLOCKTAGNAME = '(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)'; + public const PARTIAL_BLOCKTAGNAME = '(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)'; public const PARTIAL_ATTRIBUTENAME = '[a-z_:][a-z0-9:._-]*'; public const PARTIAL_UNQUOTEDVALUE = '[^"\'=<>`\x00-\x20]+'; public const PARTIAL_SINGLEQUOTEDVALUE = '\'[^\']*\''; diff --git a/setup/inc/setup.func.inc.php b/setup/inc/setup.func.inc.php index 4b3c88621..be04f7f86 100644 --- a/setup/inc/setup.func.inc.php +++ b/setup/inc/setup.func.inc.php @@ -302,8 +302,6 @@ function write_conf_file($val) { $conf_file .= "\$phpwcms['SMTP_SECURE'] = '" . escape_quote($val["SMTP_SECURE"]) . "'; // secure connection, phpMailer options: '', 'ssl' or 'tls'\n"; $conf_file .= "\$phpwcms['SMTP_AUTH'] = " . intval($val["SMTP_AUTH"]) . "; // SMTP authentication, ON=1/OFF=0\n"; $conf_file .= "\$phpwcms['SMTP_AUTH_TYPE'] = '" . escape_quote($val["SMTP_AUTH_TYPE"]) . "'; // sets SMTP auth type: LOGIN (default), PLAIN, NTLM, CRAM-MD5\n"; - $conf_file .= "\$phpwcms['SMTP_REALM'] = '" . escape_quote($val["SMTP_REALM"]) . "'; // SMTP realm, used for NTLM auth type\n"; - $conf_file .= "\$phpwcms['SMTP_WORKSTATION'] = '" . escape_quote($val["SMTP_WORKSTATION"]) . "'; // SMTP workstation, used for NTLM auth type\n"; $conf_file .= "\ndefine('PHPWCMS_INCLUDE_CHECK', true);\n"; diff --git a/setup/setup.conf.inc.php b/setup/setup.conf.inc.php index dd0a4a93c..030f4431b 100644 --- a/setup/setup.conf.inc.php +++ b/setup/setup.conf.inc.php @@ -169,5 +169,3 @@ $phpwcms['SMTP_SECURE'] = ''; // secure connection, phpMailer options: '', 'ssl' or 'tls' $phpwcms['SMTP_AUTH'] = 0; // SMTP authentication, ON=1/OFF=0 $phpwcms['SMTP_AUTH_TYPE'] = ''; // sets SMTP auth type: LOGIN (default), PLAIN, NTLM, CRAM-MD5 -$phpwcms['SMTP_REALM'] = ''; // SMTP realm, used for NTLM auth type -$phpwcms['SMTP_WORKSTATION'] = ''; // SMTP workstation, used for NTLM auth type