From 74296a80d0bd9308159c74471ba0db3bbf8b2d0f Mon Sep 17 00:00:00 2001 From: yankl Date: Wed, 28 Apr 2021 19:45:25 +0300 Subject: [PATCH 01/13] Add back Yiddish to Language Codes --- system/src/Grav/Common/Language/LanguageCodes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/src/Grav/Common/Language/LanguageCodes.php b/system/src/Grav/Common/Language/LanguageCodes.php index 3fa494859..08133aa34 100644 --- a/system/src/Grav/Common/Language/LanguageCodes.php +++ b/system/src/Grav/Common/Language/LanguageCodes.php @@ -153,6 +153,7 @@ class LanguageCodes 'vi' => [ 'name' => 'Vietnamese', 'nativeName' => 'Tiếng Việt' ], 'wo' => [ 'name' => 'Wolof', 'nativeName' => 'Wolof' ], 'xh' => [ 'name' => 'Xhosa', 'nativeName' => 'isiXhosa' ], + 'yi' => [ 'name' => 'Yiddish', 'nativeName' => 'ייִדיש', 'orientation' => 'rtl' ], 'zh' => [ 'name' => 'Chinese (Simplified)', 'nativeName' => '中文 (简体)' ], 'zh-CN' => [ 'name' => 'Chinese (Simplified)', 'nativeName' => '中文 (简体)' ], 'zh-TW' => [ 'name' => 'Chinese (Traditional)', 'nativeName' => '正體中文 (繁體)' ], From 6b57f29511f649599210a2cd5e8ab8f2c354c55a Mon Sep 17 00:00:00 2001 From: Yankl-Peretz Blum Date: Wed, 1 Jun 2022 01:47:11 +0300 Subject: [PATCH 02/13] Add Eastern Yiddish 'yi' actually refers to a macrolanguage. The only language in current use in this category is Eastern Yiddish, with language code 'ydd' --- system/src/Grav/Common/Language/LanguageCodes.php | 1 + 1 file changed, 1 insertion(+) diff --git a/system/src/Grav/Common/Language/LanguageCodes.php b/system/src/Grav/Common/Language/LanguageCodes.php index 08133aa34..ddd37c9b8 100644 --- a/system/src/Grav/Common/Language/LanguageCodes.php +++ b/system/src/Grav/Common/Language/LanguageCodes.php @@ -154,6 +154,7 @@ class LanguageCodes 'wo' => [ 'name' => 'Wolof', 'nativeName' => 'Wolof' ], 'xh' => [ 'name' => 'Xhosa', 'nativeName' => 'isiXhosa' ], 'yi' => [ 'name' => 'Yiddish', 'nativeName' => 'ייִדיש', 'orientation' => 'rtl' ], + 'ydd' => [ 'name' => 'Yiddish', 'nativeName' => 'ייִדיש', 'orientation' => 'rtl' ], 'zh' => [ 'name' => 'Chinese (Simplified)', 'nativeName' => '中文 (简体)' ], 'zh-CN' => [ 'name' => 'Chinese (Simplified)', 'nativeName' => '中文 (简体)' ], 'zh-TW' => [ 'name' => 'Chinese (Traditional)', 'nativeName' => '正體中文 (繁體)' ], From 81aa4601e4e9383d4a84e160be1b934e7744f29d Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 6 Jun 2022 11:37:10 +0300 Subject: [PATCH 03/13] Changelog update --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bead369f0..94d5938d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # v1.7.34 ## mm/dd/2022 +1. [](#new) + * Added back Yiddish to Language Codes [#3336](https://github.com/getgrav/grav/pull/3336) 1. [](#bugfix) * Regression: Fixed saving page with a new language causing cache corruption [getgrav/grav-plugin-admin#2282](https://github.com/getgrav/grav-plugin-admin/issues/2282) * Fixed a potential fatal error when using watermark in images From f46449258270f497703e1498974d63b1929390a0 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Fri, 10 Jun 2022 11:51:28 +0300 Subject: [PATCH 04/13] Composer update --- composer.lock | 278 +++++++++++++++++++++++++------------------------- 1 file changed, 139 insertions(+), 139 deletions(-) diff --git a/composer.lock b/composer.lock index fc34f8221..21a9f87c1 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "composer/ca-bundle", - "version": "1.3.1", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b" + "reference": "fd5dd441932a7e10ca6e5b490e272d34c8430640" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", - "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/fd5dd441932a7e10ca6e5b490e272d34c8430640", + "reference": "fd5dd441932a7e10ca6e5b490e272d34c8430640", "shasum": "" }, "require": { @@ -64,7 +64,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.3.1" + "source": "https://github.com/composer/ca-bundle/tree/1.3.2" }, "funding": [ { @@ -80,7 +80,7 @@ "type": "tidelift" } ], - "time": "2021-10-28T20:44:15+00:00" + "time": "2022-05-24T11:56:16+00:00" }, { "name": "composer/semver", @@ -164,16 +164,16 @@ }, { "name": "doctrine/cache", - "version": "1.12.1", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "4cf401d14df219fa6f38b671f5493449151c9ad8" + "reference": "56cd022adb5514472cb144c087393c1821911d09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/4cf401d14df219fa6f38b671f5493449151c9ad8", - "reference": "4cf401d14df219fa6f38b671f5493449151c9ad8", + "url": "https://api.github.com/repos/doctrine/cache/zipball/56cd022adb5514472cb144c087393c1821911d09", + "reference": "56cd022adb5514472cb144c087393c1821911d09", "shasum": "" }, "require": { @@ -185,13 +185,13 @@ "require-dev": { "alcaeus/mongo-php-adapter": "^1.1", "cache/integration-tests": "dev-master", - "doctrine/coding-standard": "^8.0", + "doctrine/coding-standard": "^9", "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", "predis/predis": "~1.0", "psr/cache": "^1.0 || ^2.0 || ^3.0", - "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", - "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" }, "suggest": { "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" @@ -243,7 +243,7 @@ ], "support": { "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/1.12.1" + "source": "https://github.com/doctrine/cache/tree/1.13.0" }, "funding": [ { @@ -259,7 +259,7 @@ "type": "tidelift" } ], - "time": "2021-07-17T14:39:21+00:00" + "time": "2022-05-20T20:06:54+00:00" }, { "name": "doctrine/collections", @@ -332,16 +332,16 @@ }, { "name": "donatj/phpuseragentparser", - "version": "v1.6.0", + "version": "v1.6.1", "source": { "type": "git", "url": "https://github.com/donatj/PhpUserAgent.git", - "reference": "c84fd3c205097843aab93290f2a5744b4159e815" + "reference": "264cf23eda626c223d21535584c33794be0ea338" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/donatj/PhpUserAgent/zipball/c84fd3c205097843aab93290f2a5744b4159e815", - "reference": "c84fd3c205097843aab93290f2a5744b4159e815", + "url": "https://api.github.com/repos/donatj/PhpUserAgent/zipball/264cf23eda626c223d21535584c33794be0ea338", + "reference": "264cf23eda626c223d21535584c33794be0ea338", "shasum": "" }, "require": { @@ -385,7 +385,7 @@ ], "support": { "issues": "https://github.com/donatj/PhpUserAgent/issues", - "source": "https://github.com/donatj/PhpUserAgent/tree/v1.6.0" + "source": "https://github.com/donatj/PhpUserAgent/tree/v1.6.1" }, "funding": [ { @@ -397,7 +397,7 @@ "type": "github" } ], - "time": "2022-04-20T03:05:31+00:00" + "time": "2022-06-08T16:36:31+00:00" }, { "name": "dragonmantank/cron-expression", @@ -1223,16 +1223,16 @@ }, { "name": "monolog/monolog", - "version": "1.27.0", + "version": "1.27.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "52ebd235c1f7e0d5e1b16464b695a28335f8e44a" + "reference": "904713c5929655dc9b97288b69cfeedad610c9a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/52ebd235c1f7e0d5e1b16464b695a28335f8e44a", - "reference": "52ebd235c1f7e0d5e1b16464b695a28335f8e44a", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/904713c5929655dc9b97288b69cfeedad610c9a1", + "reference": "904713c5929655dc9b97288b69cfeedad610c9a1", "shasum": "" }, "require": { @@ -1293,7 +1293,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/1.27.0" + "source": "https://github.com/Seldaek/monolog/tree/1.27.1" }, "funding": [ { @@ -1305,7 +1305,7 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:29:46+00:00" + "time": "2022-06-09T08:53:42+00:00" }, { "name": "multiavatar/multiavatar-php", @@ -2224,16 +2224,16 @@ }, { "name": "symfony/console", - "version": "v4.4.41", + "version": "v4.4.42", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "0e1e62083b20ccb39c2431293de060f756af905c" + "reference": "cce7a9f99e22937a71a16b23afa762558808d587" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/0e1e62083b20ccb39c2431293de060f756af905c", - "reference": "0e1e62083b20ccb39c2431293de060f756af905c", + "url": "https://api.github.com/repos/symfony/console/zipball/cce7a9f99e22937a71a16b23afa762558808d587", + "reference": "cce7a9f99e22937a71a16b23afa762558808d587", "shasum": "" }, "require": { @@ -2294,7 +2294,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.41" + "source": "https://github.com/symfony/console/tree/v4.4.42" }, "funding": [ { @@ -2310,7 +2310,7 @@ "type": "tidelift" } ], - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-05-14T12:35:33+00:00" }, { "name": "symfony/contracts", @@ -2408,16 +2408,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.4.37", + "version": "v4.4.42", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "3ccfcfb96ecce1217d7b0875a0736976bc6e63dc" + "reference": "708e761740c16b02c86e3f0c932018a06b895d40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3ccfcfb96ecce1217d7b0875a0736976bc6e63dc", - "reference": "3ccfcfb96ecce1217d7b0875a0736976bc6e63dc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/708e761740c16b02c86e3f0c932018a06b895d40", + "reference": "708e761740c16b02c86e3f0c932018a06b895d40", "shasum": "" }, "require": { @@ -2472,7 +2472,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.37" + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.42" }, "funding": [ { @@ -2488,20 +2488,20 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:41:36+00:00" + "time": "2022-05-05T15:33:49+00:00" }, { "name": "symfony/http-client", - "version": "v4.4.41", + "version": "v4.4.42", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "bad7c3296590c5a69a9ed89e8a51f13c07c34b54" + "reference": "0366fe9d67709477e86b45e2e51a34ccf5018d04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/bad7c3296590c5a69a9ed89e8a51f13c07c34b54", - "reference": "bad7c3296590c5a69a9ed89e8a51f13c07c34b54", + "url": "https://api.github.com/repos/symfony/http-client/zipball/0366fe9d67709477e86b45e2e51a34ccf5018d04", + "reference": "0366fe9d67709477e86b45e2e51a34ccf5018d04", "shasum": "" }, "require": { @@ -2553,7 +2553,7 @@ "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-client/tree/v4.4.41" + "source": "https://github.com/symfony/http-client/tree/v4.4.42" }, "funding": [ { @@ -2569,20 +2569,20 @@ "type": "tidelift" } ], - "time": "2022-04-12T15:19:55+00:00" + "time": "2022-05-17T14:14:05+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { @@ -2597,7 +2597,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2635,7 +2635,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -2651,20 +2651,20 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" + "reference": "143f1881e655bebca1312722af8068de235ae5dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/143f1881e655bebca1312722af8068de235ae5dc", + "reference": "143f1881e655bebca1312722af8068de235ae5dc", "shasum": "" }, "require": { @@ -2679,7 +2679,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2718,7 +2718,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.26.0" }, "funding": [ { @@ -2734,20 +2734,20 @@ "type": "tidelift" } ], - "time": "2022-01-04T09:04:05+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", "shasum": "" }, "require": { @@ -2762,7 +2762,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2801,7 +2801,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" }, "funding": [ { @@ -2817,20 +2817,20 @@ "type": "tidelift" } ], - "time": "2021-11-30T18:21:41+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php74", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php74.git", - "reference": "a5d80cdf049bd3b0af6da91184a2cd37533c0fd8" + "reference": "ad4f7d62a17b1187d9f381f0a662aab19ff3c033" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php74/zipball/a5d80cdf049bd3b0af6da91184a2cd37533c0fd8", - "reference": "a5d80cdf049bd3b0af6da91184a2cd37533c0fd8", + "url": "https://api.github.com/repos/symfony/polyfill-php74/zipball/ad4f7d62a17b1187d9f381f0a662aab19ff3c033", + "reference": "ad4f7d62a17b1187d9f381f0a662aab19ff3c033", "shasum": "" }, "require": { @@ -2839,7 +2839,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2881,7 +2881,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php74/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php74/tree/v1.26.0" }, "funding": [ { @@ -2897,20 +2897,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c" + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4407588e0d3f1f52efb65fbe92babe41f37fe50c", - "reference": "4407588e0d3f1f52efb65fbe92babe41f37fe50c", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { @@ -2919,7 +2919,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2964,7 +2964,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -2980,20 +2980,20 @@ "type": "tidelift" } ], - "time": "2022-03-04T08:16:47+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.25.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", "shasum": "" }, "require": { @@ -3002,7 +3002,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3043,7 +3043,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" }, "funding": [ { @@ -3059,7 +3059,7 @@ "type": "tidelift" } ], - "time": "2021-09-13T13:58:11+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/process", @@ -3125,16 +3125,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.41", + "version": "v4.4.42", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481" + "reference": "742aab50ad097bcb62d91fccb613f66b8047d2ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/58eb36075c04aaf92a7a9f38ee9a8b97e24eb481", - "reference": "58eb36075c04aaf92a7a9f38ee9a8b97e24eb481", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/742aab50ad097bcb62d91fccb613f66b8047d2ca", + "reference": "742aab50ad097bcb62d91fccb613f66b8047d2ca", "shasum": "" }, "require": { @@ -3194,7 +3194,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.41" + "source": "https://github.com/symfony/var-dumper/tree/v4.4.42" }, "funding": [ { @@ -3210,7 +3210,7 @@ "type": "tidelift" } ], - "time": "2022-04-25T21:15:06+00:00" + "time": "2022-05-21T10:00:54+00:00" }, { "name": "symfony/yaml", @@ -3753,20 +3753,20 @@ }, { "name": "codeception/module-phpbrowser", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/Codeception/module-phpbrowser.git", - "reference": "770a6be4160a5c0c08d100dd51bff35f6056bbf1" + "reference": "8ba6bede11d0914e74d98691f427fd8f397f192e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/module-phpbrowser/zipball/770a6be4160a5c0c08d100dd51bff35f6056bbf1", - "reference": "770a6be4160a5c0c08d100dd51bff35f6056bbf1", + "url": "https://api.github.com/repos/Codeception/module-phpbrowser/zipball/8ba6bede11d0914e74d98691f427fd8f397f192e", + "reference": "8ba6bede11d0914e74d98691f427fd8f397f192e", "shasum": "" }, "require": { - "codeception/codeception": "^4.0", + "codeception/codeception": "^4.1", "codeception/lib-innerbrowser": "^1.3", "guzzlehttp/guzzle": "^6.3|^7.0", "php": ">=5.6.0 <9.0" @@ -3807,22 +3807,22 @@ ], "support": { "issues": "https://github.com/Codeception/module-phpbrowser/issues", - "source": "https://github.com/Codeception/module-phpbrowser/tree/1.0.2" + "source": "https://github.com/Codeception/module-phpbrowser/tree/1.0.3" }, - "time": "2020-10-24T15:29:28+00:00" + "time": "2022-05-21T13:50:41+00:00" }, { "name": "codeception/phpunit-wrapper", - "version": "9.0.7", + "version": "9.0.9", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "7d6b1a5ea4ed28d010e5d36b993db813eb49710b" + "reference": "7439a53ae367986e9c22b2ac00f9d7376bb2f8cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7d6b1a5ea4ed28d010e5d36b993db813eb49710b", - "reference": "7d6b1a5ea4ed28d010e5d36b993db813eb49710b", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/7439a53ae367986e9c22b2ac00f9d7376bb2f8cf", + "reference": "7439a53ae367986e9c22b2ac00f9d7376bb2f8cf", "shasum": "" }, "require": { @@ -3856,9 +3856,9 @@ "description": "PHPUnit classes used by Codeception", "support": { "issues": "https://github.com/Codeception/phpunit-wrapper/issues", - "source": "https://github.com/Codeception/phpunit-wrapper/tree/9.0.7" + "source": "https://github.com/Codeception/phpunit-wrapper/tree/9.0.9" }, - "time": "2022-01-26T14:43:10+00:00" + "time": "2022-05-23T06:24:11+00:00" }, { "name": "codeception/stub", @@ -4018,16 +4018,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.2", + "version": "7.4.4", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4" + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4", - "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e3ff079b22820c2029d4c2a87796b6a0b8716ad8", + "reference": "e3ff079b22820c2029d4c2a87796b6a0b8716ad8", "shasum": "" }, "require": { @@ -4122,7 +4122,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.2" + "source": "https://github.com/guzzle/guzzle/tree/7.4.4" }, "funding": [ { @@ -4138,7 +4138,7 @@ "type": "tidelift" } ], - "time": "2022-03-20T14:16:28+00:00" + "time": "2022-06-09T21:39:15+00:00" }, { "name": "guzzlehttp/promises", @@ -4285,16 +4285,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.14.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", + "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", "shasum": "" }, "require": { @@ -4335,9 +4335,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-05-31T20:59:12+00:00" }, { "name": "phar-io/manifest", @@ -4679,16 +4679,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.6.8", + "version": "1.7.12", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d76498c5531232cb8386ceb6004f7e013138d3ba" + "reference": "32f10779d9cd88a9cbd972ec611a4148a3cbbc7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d76498c5531232cb8386ceb6004f7e013138d3ba", - "reference": "d76498c5531232cb8386ceb6004f7e013138d3ba", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/32f10779d9cd88a9cbd972ec611a4148a3cbbc7e", + "reference": "32f10779d9cd88a9cbd972ec611a4148a3cbbc7e", "shasum": "" }, "require": { @@ -4714,7 +4714,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.6.8" + "source": "https://github.com/phpstan/phpstan/tree/1.7.12" }, "funding": [ { @@ -4734,7 +4734,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T06:54:21+00:00" + "time": "2022-06-09T12:39:36+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -6430,16 +6430,16 @@ }, { "name": "symfony/dom-crawler", - "version": "v5.4.6", + "version": "v5.4.9", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "c0bda97480d96337bd3866026159a8b358665457" + "reference": "a213cbc80382320b0efdccdcdce232f191fafe3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c0bda97480d96337bd3866026159a8b358665457", - "reference": "c0bda97480d96337bd3866026159a8b358665457", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/a213cbc80382320b0efdccdcdce232f191fafe3a", + "reference": "a213cbc80382320b0efdccdcdce232f191fafe3a", "shasum": "" }, "require": { @@ -6485,7 +6485,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v5.4.6" + "source": "https://github.com/symfony/dom-crawler/tree/v5.4.9" }, "funding": [ { @@ -6501,7 +6501,7 @@ "type": "tidelift" } ], - "time": "2022-03-02T12:42:23+00:00" + "time": "2022-05-04T14:46:32+00:00" }, { "name": "symfony/finder", @@ -6618,21 +6618,21 @@ }, { "name": "webmozart/assert", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", @@ -6670,9 +6670,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], From 0b54a7b4bcbec2876e11367397914f5ddd1f40b7 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 13 Jun 2022 18:22:03 +0300 Subject: [PATCH 05/13] Ignore upcoming `media.json` file in media --- CHANGELOG.md | 1 + system/src/Grav/Common/Page/Media.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94d5938d5..3dad15852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ 1. [](#new) * Added back Yiddish to Language Codes [#3336](https://github.com/getgrav/grav/pull/3336) + * Ignore upcoming `media.json` file in media 1. [](#bugfix) * Regression: Fixed saving page with a new language causing cache corruption [getgrav/grav-plugin-admin#2282](https://github.com/getgrav/grav-plugin-admin/issues/2282) * Fixed a potential fatal error when using watermark in images diff --git a/system/src/Grav/Common/Page/Media.php b/system/src/Grav/Common/Page/Media.php index 6c0a6c390..b80fd9686 100644 --- a/system/src/Grav/Common/Page/Media.php +++ b/system/src/Grav/Common/Page/Media.php @@ -152,7 +152,7 @@ class Media extends AbstractMedia foreach ($iterator as $file => $info) { // Ignore folders and Markdown files. $filename = $info->getFilename(); - if (!$info->isFile() || $info->getExtension() === 'md' || $filename === 'frontmatter.yaml' || strpos($filename, '.') === 0) { + if (!$info->isFile() || $info->getExtension() === 'md' || $filename === 'frontmatter.yaml' || $filename === 'media.json' || strpos($filename, '.') === 0) { continue; } From f570cea3bdaaf9169fde62e011334148eb88dec7 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 13 Jun 2022 19:19:00 +0300 Subject: [PATCH 06/13] Fixed alias class references --- composer.lock | 12 ++++++------ system/src/Grav/Common/GPM/GPM.php | 1 + .../Common/GPM/Remote/AbstractPackageCollection.php | 2 +- system/src/Grav/Console/Gpm/DirectInstallCommand.php | 3 +-- system/src/Grav/Console/Gpm/InstallCommand.php | 2 +- system/src/Grav/Console/Gpm/SelfupgradeCommand.php | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index 21a9f87c1..3d2899e19 100644 --- a/composer.lock +++ b/composer.lock @@ -4679,16 +4679,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.7.12", + "version": "1.7.13", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "32f10779d9cd88a9cbd972ec611a4148a3cbbc7e" + "reference": "86ffc063bfd8f264c9eba568e84b0225a6090d09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/32f10779d9cd88a9cbd972ec611a4148a3cbbc7e", - "reference": "32f10779d9cd88a9cbd972ec611a4148a3cbbc7e", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/86ffc063bfd8f264c9eba568e84b0225a6090d09", + "reference": "86ffc063bfd8f264c9eba568e84b0225a6090d09", "shasum": "" }, "require": { @@ -4714,7 +4714,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.7.12" + "source": "https://github.com/phpstan/phpstan/tree/1.7.13" }, "funding": [ { @@ -4734,7 +4734,7 @@ "type": "tidelift" } ], - "time": "2022-06-09T12:39:36+00:00" + "time": "2022-06-13T15:15:39+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", diff --git a/system/src/Grav/Common/GPM/GPM.php b/system/src/Grav/Common/GPM/GPM.php index 7031945b2..4ca84e3f0 100644 --- a/system/src/Grav/Common/GPM/GPM.php +++ b/system/src/Grav/Common/GPM/GPM.php @@ -12,6 +12,7 @@ namespace Grav\Common\GPM; use Exception; use Grav\Common\Grav; use Grav\Common\Filesystem\Folder; +use Grav\Common\HTTP\Response; use Grav\Common\Inflector; use Grav\Common\Iterator; use Grav\Common\Utils; diff --git a/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php b/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php index 02e98e759..d8663dc8d 100644 --- a/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php +++ b/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php @@ -10,8 +10,8 @@ namespace Grav\Common\GPM\Remote; use Grav\Common\Grav; +use Grav\Common\HTTP\Response; use Grav\Common\GPM\Common\AbstractPackageCollection as BaseCollection; -use Grav\Common\GPM\Response; use \Doctrine\Common\Cache\FilesystemCache; use RuntimeException; diff --git a/system/src/Grav/Console/Gpm/DirectInstallCommand.php b/system/src/Grav/Console/Gpm/DirectInstallCommand.php index fbb02207c..881d6f950 100644 --- a/system/src/Grav/Console/Gpm/DirectInstallCommand.php +++ b/system/src/Grav/Console/Gpm/DirectInstallCommand.php @@ -10,12 +10,11 @@ namespace Grav\Console\Gpm; use Exception; -use Grav\Common\Cache; use Grav\Common\Grav; use Grav\Common\Filesystem\Folder; +use Grav\Common\HTTP\Response; use Grav\Common\GPM\GPM; use Grav\Common\GPM\Installer; -use Grav\Common\GPM\Response; use Grav\Console\GpmCommand; use RuntimeException; use Symfony\Component\Console\Input\InputArgument; diff --git a/system/src/Grav/Console/Gpm/InstallCommand.php b/system/src/Grav/Console/Gpm/InstallCommand.php index d25ebe3c5..a2aca0a45 100644 --- a/system/src/Grav/Console/Gpm/InstallCommand.php +++ b/system/src/Grav/Console/Gpm/InstallCommand.php @@ -11,10 +11,10 @@ namespace Grav\Console\Gpm; use Exception; use Grav\Common\Filesystem\Folder; +use Grav\Common\HTTP\Response; use Grav\Common\GPM\GPM; use Grav\Common\GPM\Installer; use Grav\Common\GPM\Licenses; -use Grav\Common\GPM\Response; use Grav\Common\GPM\Remote\Package; use Grav\Common\Grav; use Grav\Common\Utils; diff --git a/system/src/Grav/Console/Gpm/SelfupgradeCommand.php b/system/src/Grav/Console/Gpm/SelfupgradeCommand.php index a3d53ffee..30bc5f5ab 100644 --- a/system/src/Grav/Console/Gpm/SelfupgradeCommand.php +++ b/system/src/Grav/Console/Gpm/SelfupgradeCommand.php @@ -11,8 +11,8 @@ namespace Grav\Console\Gpm; use Exception; use Grav\Common\Filesystem\Folder; +use Grav\Common\HTTP\Response; use Grav\Common\GPM\Installer; -use Grav\Common\GPM\Response; use Grav\Common\GPM\Upgrader; use Grav\Common\Grav; use Grav\Console\GpmCommand; From f31541250f07d51883dc5869acddcdce0822123b Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 13 Jun 2022 19:29:42 +0300 Subject: [PATCH 07/13] Fixed broken phpstan tests --- tests/phpstan/phpstan.neon | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpstan/phpstan.neon b/tests/phpstan/phpstan.neon index 7d5d7cb00..bc966fa88 100644 --- a/tests/phpstan/phpstan.neon +++ b/tests/phpstan/phpstan.neon @@ -156,11 +156,15 @@ parameters: - '#Call to deprecated method stopPropagation\(\) of class Symfony\\Component\\EventDispatcher\\Event#' - '#Parameter \#2 \$listener of method Symfony\\Component\\EventDispatcher\\EventDispatcher::addListener\(\)#' - '#Parameter \#2 \$listener of method Symfony\\Component\\EventDispatcher\\EventDispatcher::removeListener\(\)#' + - '#Class Grav\\Common\\GPM\\Response not found#' # Installer updates - message: '#Variable \$this in PHPDoc tag @var does not exist#' path: '*/system/src/Grav/Installer/updates/*' + - + message: '#YamlUpdater::isInlineComment\(\) is unused#' + path: '*/system/src/Grav/Installer/YamlUpdater.php' # Twig Deferred extension compatibility - From de4af5dbccd8b22b295f956ef143a79272b1fb62 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 13 Jun 2022 20:38:16 +0300 Subject: [PATCH 08/13] Fixed `bin/grav install` command with arbitrary destination folder name --- CHANGELOG.md | 1 + system/src/Grav/Console/Cli/InstallCommand.php | 2 +- system/src/Grav/Console/ConsoleTrait.php | 2 +- system/src/Grav/Console/Gpm/InstallCommand.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dad15852..19511c000 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ 1. [](#bugfix) * Regression: Fixed saving page with a new language causing cache corruption [getgrav/grav-plugin-admin#2282](https://github.com/getgrav/grav-plugin-admin/issues/2282) * Fixed a potential fatal error when using watermark in images + * Fixed `bin/grav install` command with arbitrary destination folder name # v1.7.33 ## 04/25/2022 diff --git a/system/src/Grav/Console/Cli/InstallCommand.php b/system/src/Grav/Console/Cli/InstallCommand.php index 33198cb5f..ae3825330 100644 --- a/system/src/Grav/Console/Cli/InstallCommand.php +++ b/system/src/Grav/Console/Cli/InstallCommand.php @@ -147,7 +147,7 @@ class InstallCommand extends GravCommand foreach ($this->config['git'] as $repo => $data) { $path = $this->destination . DS . $data['path']; if (!file_exists($path)) { - exec('cd "' . $this->destination . '" && git clone -b ' . $data['branch'] . ' --depth 1 ' . $data['url'] . ' ' . $data['path'], $output, $return); + exec('cd ' . escapeshellarg($this->destination) . ' && git clone -b ' . $data['branch'] . ' --depth 1 ' . $data['url'] . ' ' . $data['path'], $output, $return); if (!$return) { $io->writeln('SUCCESS cloned ' . $data['url'] . ' -> ' . $path . ''); diff --git a/system/src/Grav/Console/ConsoleTrait.php b/system/src/Grav/Console/ConsoleTrait.php index 0af4075ab..d35fc7cfe 100644 --- a/system/src/Grav/Console/ConsoleTrait.php +++ b/system/src/Grav/Console/ConsoleTrait.php @@ -288,7 +288,7 @@ trait ConsoleTrait { $composer = Composer::getComposerExecutor(); - return system($composer . ' --working-dir="'.$path.'" --no-interaction --no-dev --prefer-dist -o '. $action); + return system($composer . ' --working-dir=' . escapeshellarg($path) . ' --no-interaction --no-dev --prefer-dist -o '. $action); } /** diff --git a/system/src/Grav/Console/Gpm/InstallCommand.php b/system/src/Grav/Console/Gpm/InstallCommand.php index a2aca0a45..5ad47f8d4 100644 --- a/system/src/Grav/Console/Gpm/InstallCommand.php +++ b/system/src/Grav/Console/Gpm/InstallCommand.php @@ -485,7 +485,7 @@ class InstallCommand extends GpmCommand { $io = $this->getIO(); - exec('cd ' . $this->destination); + exec('cd ' . escapeshellarg($this->destination)); $to = $this->destination . DS . $package->install_path; $from = $this->getSymlinkSource($package); From 9d6a2dba09fd4e56f5cdfb9a399caea355bfeb83 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 13 Jun 2022 21:11:33 +0300 Subject: [PATCH 09/13] Fixed Twig `|filter()` allowing code execution --- CHANGELOG.md | 1 + .../Common/Twig/Extension/GravExtension.php | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19511c000..0510670b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Regression: Fixed saving page with a new language causing cache corruption [getgrav/grav-plugin-admin#2282](https://github.com/getgrav/grav-plugin-admin/issues/2282) * Fixed a potential fatal error when using watermark in images * Fixed `bin/grav install` command with arbitrary destination folder name + * Fixed Twig `|filter()` allowing code execution # v1.7.33 ## 04/25/2022 diff --git a/system/src/Grav/Common/Twig/Extension/GravExtension.php b/system/src/Grav/Common/Twig/Extension/GravExtension.php index a2a76b317..41c8528d8 100644 --- a/system/src/Grav/Common/Twig/Extension/GravExtension.php +++ b/system/src/Grav/Common/Twig/Extension/GravExtension.php @@ -9,6 +9,7 @@ namespace Grav\Common\Twig\Extension; +use CallbackFilterIterator; use Cron\CronExpression; use Grav\Common\Config\Config; use Grav\Common\Data\Data; @@ -41,6 +42,7 @@ use JsonSerializable; use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; use Traversable; use Twig\Environment; +use Twig\Error\RuntimeError; use Twig\Extension\AbstractExtension; use Twig\Extension\GlobalsInterface; use Twig\Loader\FilesystemLoader; @@ -167,6 +169,9 @@ class GravExtension extends AbstractExtension implements GlobalsInterface // PHP methods new TwigFilter('count', 'count'), new TwigFilter('array_diff', 'array_diff'), + + // Security fix + new TwigFilter('filter', [$this, 'filterFilter'], ['needs_environment' => true]), ]; } @@ -1676,4 +1681,20 @@ class GravExtension extends AbstractExtension implements GlobalsInterface return is_string($var); } } + + /** + * @param Environment $env + * @param array $array + * @param callable|string $arrow + * @return array|CallbackFilterIterator + * @throws RuntimeError + */ + function filterFilter(Environment $env, $array, $arrow) + { + if (is_string($arrow) && Utils::isDangerousFunction($arrow)) { + throw new RuntimeError('Twig |filter("' . $arrow . '") is not allowed.'); + } + + return \twig_array_filter($env, $array, $arrow); + } } From b18b49a239cbd229c96a7bbc675f7f4754bd2414 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 14 Jun 2022 10:43:46 +0300 Subject: [PATCH 10/13] Fixed login and user search by email not being case-insensitive when using Flex Users --- CHANGELOG.md | 1 + system/src/Grav/Common/Flex/Types/Users/UserIndex.php | 2 +- system/src/Grav/Common/Service/FlexServiceProvider.php | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0510670b1..1efaf8dae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * Fixed a potential fatal error when using watermark in images * Fixed `bin/grav install` command with arbitrary destination folder name * Fixed Twig `|filter()` allowing code execution + * Fixed login and user search by email not being case-insensitive when using Flex Users # v1.7.33 ## 04/25/2022 diff --git a/system/src/Grav/Common/Flex/Types/Users/UserIndex.php b/system/src/Grav/Common/Flex/Types/Users/UserIndex.php index 4a33b7304..aff6e1570 100644 --- a/system/src/Grav/Common/Flex/Types/Users/UserIndex.php +++ b/system/src/Grav/Common/Flex/Types/Users/UserIndex.php @@ -142,7 +142,7 @@ class UserIndex extends FlexIndex implements UserCollectionInterface } elseif ($field === 'flex_key') { $user = $this->withKeyField('flex_key')->get($query); } elseif ($field === 'email') { - $user = $this->withKeyField('email')->get($query); + $user = $this->withKeyField('email')->get(static::filterUsername($query, $this->getFlexDirectory()->getStorage())); } elseif ($field === 'username') { $user = $this->get(static::filterUsername($query, $this->getFlexDirectory()->getStorage())); } else { diff --git a/system/src/Grav/Common/Service/FlexServiceProvider.php b/system/src/Grav/Common/Service/FlexServiceProvider.php index e7b283ab0..21192926f 100644 --- a/system/src/Grav/Common/Service/FlexServiceProvider.php +++ b/system/src/Grav/Common/Service/FlexServiceProvider.php @@ -97,7 +97,9 @@ class FlexServiceProvider implements ServiceProviderInterface 'options' => [ 'file' => 'user', 'pattern' => '{FOLDER}/{KEY:2}/{KEY}/{FILE}{EXT}', - 'key' => 'storage_key' + 'key' => 'storage_key', + 'indexed' => true, + 'case_sensitive' => false ], ]; } @@ -107,7 +109,9 @@ class FlexServiceProvider implements ServiceProviderInterface 'class' => UserFileStorage::class, 'options' => [ 'pattern' => '{FOLDER}/{KEY}{EXT}', - 'key' => 'username' + 'key' => 'username', + 'indexed' => true, + 'case_sensitive' => false ], ]; } From 31920bb1535d1159dda42f89e551a7bc59676c54 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 14 Jun 2022 19:57:42 +0300 Subject: [PATCH 11/13] Composer update --- composer.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.lock b/composer.lock index 3d2899e19..0c13fda80 100644 --- a/composer.lock +++ b/composer.lock @@ -2115,23 +2115,23 @@ }, { "name": "rockettheme/toolbox", - "version": "1.6.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/rockettheme/toolbox.git", - "reference": "fdf0195ced25b83525d3b084c3e81f05de96ac8c" + "reference": "99448a20a2f78d6480035d72821ecb9e4dc17032" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rockettheme/toolbox/zipball/fdf0195ced25b83525d3b084c3e81f05de96ac8c", - "reference": "fdf0195ced25b83525d3b084c3e81f05de96ac8c", + "url": "https://api.github.com/repos/rockettheme/toolbox/zipball/99448a20a2f78d6480035d72821ecb9e4dc17032", + "reference": "99448a20a2f78d6480035d72821ecb9e4dc17032", "shasum": "" }, "require": { "ext-json": "*", "php": ">=5.6.0", "pimple/pimple": "^3.0", - "symfony/event-dispatcher": "^3.4|^4.0|^5.0", + "symfony/event-dispatcher": "^3.4|^4.0", "symfony/yaml": "^3.4|^4.0|^5.0" }, "type": "library", @@ -2163,9 +2163,9 @@ ], "support": { "issues": "https://github.com/rockettheme/toolbox/issues", - "source": "https://github.com/rockettheme/toolbox/tree/1.6.1" + "source": "https://github.com/rockettheme/toolbox/tree/1.6.2" }, - "time": "2022-02-08T08:36:03+00:00" + "time": "2022-06-14T16:24:33+00:00" }, { "name": "seld/cli-prompt", @@ -4679,16 +4679,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.7.13", + "version": "1.7.14", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "86ffc063bfd8f264c9eba568e84b0225a6090d09" + "reference": "e6f145f196a59c7ca91ea926c87ef3d936c4305f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/86ffc063bfd8f264c9eba568e84b0225a6090d09", - "reference": "86ffc063bfd8f264c9eba568e84b0225a6090d09", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e6f145f196a59c7ca91ea926c87ef3d936c4305f", + "reference": "e6f145f196a59c7ca91ea926c87ef3d936c4305f", "shasum": "" }, "require": { @@ -4714,7 +4714,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.7.13" + "source": "https://github.com/phpstan/phpstan/tree/1.7.14" }, "funding": [ { @@ -4734,7 +4734,7 @@ "type": "tidelift" } ], - "time": "2022-06-13T15:15:39+00:00" + "time": "2022-06-14T13:09:35+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", From 62c4f3c768721301b1ccb25c52cd562a5bb6d064 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Tue, 14 Jun 2022 20:08:04 +0300 Subject: [PATCH 12/13] Ignore phpstan error --- system/src/Grav/Common/Twig/Extension/GravExtension.php | 2 +- tests/phpstan/phpstan.neon | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Twig/Extension/GravExtension.php b/system/src/Grav/Common/Twig/Extension/GravExtension.php index 41c8528d8..64fb315a3 100644 --- a/system/src/Grav/Common/Twig/Extension/GravExtension.php +++ b/system/src/Grav/Common/Twig/Extension/GravExtension.php @@ -1695,6 +1695,6 @@ class GravExtension extends AbstractExtension implements GlobalsInterface throw new RuntimeError('Twig |filter("' . $arrow . '") is not allowed.'); } - return \twig_array_filter($env, $array, $arrow); + return twig_array_filter($env, $array, $arrow); } } diff --git a/tests/phpstan/phpstan.neon b/tests/phpstan/phpstan.neon index bc966fa88..78bebee7d 100644 --- a/tests/phpstan/phpstan.neon +++ b/tests/phpstan/phpstan.neon @@ -170,3 +170,6 @@ parameters: - message: '#typehint with deprecated interface#' path: '*/system/src/Twig/DeferredExtension/DeferredNodeVisitorCompat.php' + - + message: '#Function twig_array_filter not found#' + path: '*/system/src/Grav/Common/Twig/Extension/GravExtension.php' From f8d736b24a00bff347f97df252328802a5b50fd8 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 14 Jun 2022 11:09:20 -0600 Subject: [PATCH 13/13] prepare for release --- CHANGELOG.md | 2 +- system/defines.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1efaf8dae..98070cb09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ # v1.7.34 -## mm/dd/2022 +## 06/14/2022 1. [](#new) * Added back Yiddish to Language Codes [#3336](https://github.com/getgrav/grav/pull/3336) diff --git a/system/defines.php b/system/defines.php index 6dbd99ecd..f053d729c 100644 --- a/system/defines.php +++ b/system/defines.php @@ -9,7 +9,7 @@ // Some standard defines define('GRAV', true); -define('GRAV_VERSION', '1.7.33'); +define('GRAV_VERSION', '1.7.34'); define('GRAV_SCHEMA', '1.7.0_2020-11-20_1'); define('GRAV_TESTING', false);