diff --git a/composer.lock b/composer.lock index ec9e3fd965d..21ec9542740 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "brumann/polyfill-unserialize", - "version": "v1.0.4", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/dbrumann/polyfill-unserialize.git", - "reference": "8ed1cd343ddc134a7ef649aca0aa0fe2a1b45008" + "reference": "46e5c18ee87d8a9b5765ef95468c1ac27bd107bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dbrumann/polyfill-unserialize/zipball/8ed1cd343ddc134a7ef649aca0aa0fe2a1b45008", - "reference": "8ed1cd343ddc134a7ef649aca0aa0fe2a1b45008", + "url": "https://api.github.com/repos/dbrumann/polyfill-unserialize/zipball/46e5c18ee87d8a9b5765ef95468c1ac27bd107bf", + "reference": "46e5c18ee87d8a9b5765ef95468c1ac27bd107bf", "shasum": "" }, "require": { @@ -40,7 +40,7 @@ } ], "description": "Backports unserialize options introduced in PHP 7.0 to older PHP versions.", - "time": "2019-07-14T23:16:24+00:00" + "time": "2020-07-24T10:16:53+00:00" }, { "name": "google/recaptcha", @@ -422,16 +422,16 @@ }, { "name": "joomla/filesystem", - "version": "1.5.2", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/filesystem.git", - "reference": "d8b8c7aff930b34fad6c850162d145bfc5852ca4" + "reference": "d8801f18db358b0284675381ab4195acd028b420" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/filesystem/zipball/d8b8c7aff930b34fad6c850162d145bfc5852ca4", - "reference": "d8b8c7aff930b34fad6c850162d145bfc5852ca4", + "url": "https://api.github.com/repos/joomla-framework/filesystem/zipball/d8801f18db358b0284675381ab4195acd028b420", + "reference": "d8801f18db358b0284675381ab4195acd028b420", "shasum": "" }, "require": { @@ -469,20 +469,30 @@ "framework", "joomla" ], - "time": "2019-10-31T22:04:06+00:00" + "funding": [ + { + "url": "https://community.joomla.org/sponsorship-campaigns.html", + "type": "custom" + }, + { + "url": "https://github.com/joomla", + "type": "github" + } + ], + "time": "2020-09-02T09:05:23+00:00" }, { "name": "joomla/filter", - "version": "1.3.5", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/filter.git", - "reference": "ee1d870b5c188056745e1dd3cece21522e2158b8" + "reference": "86fec1be2b545f8c00f899658f87f80b4fc67c81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/filter/zipball/ee1d870b5c188056745e1dd3cece21522e2158b8", - "reference": "ee1d870b5c188056745e1dd3cece21522e2158b8", + "url": "https://api.github.com/repos/joomla-framework/filter/zipball/86fec1be2b545f8c00f899658f87f80b4fc67c81", + "reference": "86fec1be2b545f8c00f899658f87f80b4fc67c81", "shasum": "" }, "require": { @@ -519,7 +529,7 @@ "framework", "joomla" ], - "time": "2018-05-26T15:48:53+00:00" + "time": "2020-06-08T22:31:51+00:00" }, { "name": "joomla/image", @@ -669,16 +679,16 @@ }, { "name": "joomla/registry", - "version": "1.6.2", + "version": "1.6.3", "source": { "type": "git", "url": "https://github.com/joomla-framework/registry.git", - "reference": "182eed3a56b2b7e14cef11fdbc63c253ddcfd924" + "reference": "51c08b18838aaf2104e38c3846e34b4706e83644" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/registry/zipball/182eed3a56b2b7e14cef11fdbc63c253ddcfd924", - "reference": "182eed3a56b2b7e14cef11fdbc63c253ddcfd924", + "url": "https://api.github.com/repos/joomla-framework/registry/zipball/51c08b18838aaf2104e38c3846e34b4706e83644", + "reference": "51c08b18838aaf2104e38c3846e34b4706e83644", "shasum": "" }, "require": { @@ -691,7 +701,7 @@ "joomla/coding-standards": "~2.0@alpha", "joomla/test": "~1.0", "phpunit/phpunit": "^4.8.35|^5.4.3|~6.0", - "symfony/yaml": "~2.0|~3.0|~4.0" + "symfony/yaml": "~2.0|~3.0|~4.0|~5.0" }, "suggest": { "symfony/yaml": "Install symfony/yaml if you require YAML support." @@ -718,7 +728,7 @@ "joomla", "registry" ], - "time": "2018-06-06T16:48:30+00:00" + "time": "2019-11-27T16:58:55+00:00" }, { "name": "joomla/session", @@ -778,16 +788,16 @@ }, { "name": "joomla/string", - "version": "1.4.3", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/joomla-framework/string.git", - "reference": "fed0eee67f83b68674e8c6542ecfa28390b32fec" + "reference": "5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/string/zipball/fed0eee67f83b68674e8c6542ecfa28390b32fec", - "reference": "fed0eee67f83b68674e8c6542ecfa28390b32fec", + "url": "https://api.github.com/repos/joomla-framework/string/zipball/5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc", + "reference": "5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc", "shasum": "" }, "require": { @@ -840,7 +850,17 @@ "joomla", "string" ], - "time": "2019-08-07T12:34:12+00:00" + "funding": [ + { + "url": "https://community.joomla.org/sponsorship-campaigns.html", + "type": "custom" + }, + { + "url": "https://github.com/joomla", + "type": "github" + } + ], + "time": "2020-08-04T10:09:53+00:00" }, { "name": "joomla/uri", @@ -1233,16 +1253,16 @@ }, { "name": "psr/log", - "version": "1.1.1", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2", - "reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { @@ -1276,7 +1296,7 @@ "psr", "psr-3" ], - "time": "2019-10-25T08:06:51+00:00" + "time": "2020-03-23T09:12:05+00:00" }, { "name": "simplepie/simplepie", @@ -1334,16 +1354,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -1355,7 +1375,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1388,20 +1412,34 @@ "polyfill", "portable" ], - "time": "2019-08-06T08:03:45+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php55", - "version": "v1.12.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "548bb39407e78e54f785b4e18c7e0d5d9e493265" + "reference": "9c769895334a63971244ee25d0ac71660aa07723" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/548bb39407e78e54f785b4e18c7e0d5d9e493265", - "reference": "548bb39407e78e54f785b4e18c7e0d5d9e493265", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/9c769895334a63971244ee25d0ac71660aa07723", + "reference": "9c769895334a63971244ee25d0ac71660aa07723", "shasum": "" }, "require": { @@ -1411,7 +1449,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1444,20 +1486,34 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php56", - "version": "v1.12.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "0e3b212e96a51338639d8ce175c046d7729c3403" + "reference": "13df84e91cd168f247c2f2ec82cc0fa24901c011" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/0e3b212e96a51338639d8ce175c046d7729c3403", - "reference": "0e3b212e96a51338639d8ce175c046d7729c3403", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/13df84e91cd168f247c2f2ec82cc0fa24901c011", + "reference": "13df84e91cd168f247c2f2ec82cc0fa24901c011", "shasum": "" }, "require": { @@ -1467,7 +1523,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1500,20 +1560,34 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php71", - "version": "v1.12.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php71.git", - "reference": "834c714efee3a035533690e3dbc7caa771125d72" + "reference": "28b8b32d6905857a82597d9a0b3463a264e9d367" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php71/zipball/834c714efee3a035533690e3dbc7caa771125d72", - "reference": "834c714efee3a035533690e3dbc7caa771125d72", + "url": "https://api.github.com/repos/symfony/polyfill-php71/zipball/28b8b32d6905857a82597d9a0b3463a264e9d367", + "reference": "28b8b32d6905857a82597d9a0b3463a264e9d367", "shasum": "" }, "require": { @@ -1522,7 +1596,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1555,20 +1633,34 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.12.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188" + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", "shasum": "" }, "require": { @@ -1577,7 +1669,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1613,20 +1709,34 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/polyfill-util", - "version": "v1.12.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "4317de1386717b4c22caed7725350a8887ab205c" + "reference": "46b910c71e9828f8ec2aa7a0314de1130d9b295a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/4317de1386717b4c22caed7725350a8887ab205c", - "reference": "4317de1386717b4c22caed7725350a8887ab205c", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/46b910c71e9828f8ec2aa7a0314de1130d9b295a", + "reference": "46b910c71e9828f8ec2aa7a0314de1130d9b295a", "shasum": "" }, "require": { @@ -1635,7 +1745,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1665,11 +1779,25 @@ "polyfill", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/yaml", - "version": "v2.8.50", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -1719,22 +1847,22 @@ }, { "name": "typo3/phar-stream-wrapper", - "version": "v2.1.3", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/TYPO3/phar-stream-wrapper.git", - "reference": "e8a656d72028b97ab9f61ed993734f3cded02eeb" + "reference": "5e6269b8a54c5fe82322692f26f10dcd5e4532a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TYPO3/phar-stream-wrapper/zipball/e8a656d72028b97ab9f61ed993734f3cded02eeb", - "reference": "e8a656d72028b97ab9f61ed993734f3cded02eeb", + "url": "https://api.github.com/repos/TYPO3/phar-stream-wrapper/zipball/5e6269b8a54c5fe82322692f26f10dcd5e4532a1", + "reference": "5e6269b8a54c5fe82322692f26f10dcd5e4532a1", "shasum": "" }, "require": { - "brumann/polyfill-unserialize": "^1.0", + "brumann/polyfill-unserialize": "^1.0 || ^2.0", "ext-json": "*", - "php": "^5.3.3|^7.0" + "php": "^5.3.3 || ^7.0" }, "require-dev": { "ext-xdebug": "*", @@ -1761,7 +1889,7 @@ "security", "stream-wrapper" ], - "time": "2019-10-18T11:59:10+00:00" + "time": "2020-07-27T09:17:38+00:00" } ], "packages-dev": [ @@ -1978,33 +2106,33 @@ }, { "name": "phpspec/prophecy", - "version": "1.9.0", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -2037,7 +2165,7 @@ "spy", "stub" ], - "time": "2019-10-03T11:07:50+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpunit/dbunit", @@ -2345,6 +2473,7 @@ "keywords": [ "tokenizer" ], + "abandoned": true, "time": "2017-12-04T08:55:13+00:00" }, { @@ -2925,7 +3054,7 @@ }, { "name": "symfony/console", - "version": "v2.8.50", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/console.git", @@ -2986,7 +3115,7 @@ }, { "name": "symfony/debug", - "version": "v2.8.50", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", @@ -3043,7 +3172,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.8.50", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -3103,7 +3232,7 @@ }, { "name": "symfony/filesystem", - "version": "v2.8.50", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -3153,7 +3282,7 @@ }, { "name": "symfony/finder", - "version": "v2.8.50", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -3202,16 +3331,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.12.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", "shasum": "" }, "require": { @@ -3223,7 +3352,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -3257,11 +3390,25 @@ "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" }, { "name": "symfony/process", - "version": "v2.8.50", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -3310,7 +3457,7 @@ }, { "name": "symfony/stopwatch", - "version": "v2.8.50", + "version": "v2.8.52", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -3369,5 +3516,6 @@ "platform-dev": [], "platform-overrides": { "php": "5.3.10" - } + }, + "plugin-api-version": "1.1.0" } diff --git a/libraries/vendor/brumann/polyfill-unserialize/src/DisallowedClassesSubstitutor.php b/libraries/vendor/brumann/polyfill-unserialize/src/DisallowedClassesSubstitutor.php new file mode 100644 index 00000000000..9740d1a736b --- /dev/null +++ b/libraries/vendor/brumann/polyfill-unserialize/src/DisallowedClassesSubstitutor.php @@ -0,0 +1,177 @@ +, ]` and + * marks start and end positions of items to be ignored. + * + * @var array[] + */ + private $ignoreItems = array(); + + /** + * @param string $serialized + * @param string[] $allowedClasses + */ + public function __construct($serialized, array $allowedClasses) + { + $this->serialized = $serialized; + $this->allowedClasses = $allowedClasses; + + $this->buildIgnoreItems(); + $this->substituteObjects(); + } + + /** + * @return string + */ + public function getSubstitutedSerialized() + { + return $this->serialized; + } + + /** + * Identifies items to be ignored - like nested serializations in string literals. + */ + private function buildIgnoreItems() + { + $offset = 0; + while (preg_match(self::PATTERN_STRING, $this->serialized, $matches, PREG_OFFSET_CAPTURE, $offset)) { + $length = (int)$matches[1][0]; // given length in serialized data (e.g. `s:123:"` --> 123) + $start = $matches[2][1]; // offset position of quote character + $end = $start + $length + 1; + $offset = $end + 1; + + // serialized string nested in outer serialized string + if ($this->ignore($start, $end)) { + continue; + } + + $this->ignoreItems[] = array($start, $end); + } + } + + /** + * Substitutes disallowed object class names and respects items to be ignored. + */ + private function substituteObjects() + { + $offset = 0; + while (preg_match(self::PATTERN_OBJECT, $this->serialized, $matches, PREG_OFFSET_CAPTURE, $offset)) { + $completeMatch = (string)$matches[0][0]; + $completeLength = strlen($completeMatch); + $start = $matches[0][1]; + $end = $start + $completeLength; + $leftBorder = (string)$matches[1][0]; + $className = (string)$matches[2][0]; + $objectSize = (int)$matches[3][0]; + $offset = $end + 1; + + // class name is actually allowed - skip this item + if (in_array($className, $this->allowedClasses, true)) { + continue; + } + // serialized object nested in outer serialized string + if ($this->ignore($start, $end)) { + continue; + } + + $incompleteItem = $this->sanitizeItem($className, $leftBorder, $objectSize); + $incompleteItemLength = strlen($incompleteItem); + $offset = $start + $incompleteItemLength + 1; + + $this->replace($incompleteItem, $start, $end); + $this->shift($end, $incompleteItemLength - $completeLength); + } + } + + /** + * Replaces sanitized object class names in serialized data. + * + * @param string $replacement Sanitized object data + * @param int $start Start offset in serialized data + * @param int $end End offset in serialized data + */ + private function replace($replacement, $start, $end) + { + $this->serialized = substr($this->serialized, 0, $start) + . $replacement . substr($this->serialized, $end); + } + + /** + * Whether given offset positions should be ignored. + * + * @param int $start + * @param int $end + * @return bool + */ + private function ignore($start, $end) + { + foreach ($this->ignoreItems as $ignoreItem) { + if ($ignoreItem[0] <= $start && $ignoreItem[1] >= $end) { + return true; + } + } + + return false; + } + + /** + * Shifts offset positions of ignore items by `$size`. + * This is necessary whenever object class names have been + * substituted which have a different length than before. + * + * @param int $offset + * @param int $size + */ + private function shift($offset, $size) + { + foreach ($this->ignoreItems as &$ignoreItem) { + // only focus on items starting after given offset + if ($ignoreItem[0] < $offset) { + continue; + } + $ignoreItem[0] += $size; + $ignoreItem[1] += $size; + } + } + + /** + * Sanitizes object class item. + * + * @param string $className + * @param int $leftBorder + * @param int $objectSize + * @return string + */ + private function sanitizeItem($className, $leftBorder, $objectSize) + { + return sprintf( + '%sO:22:"__PHP_Incomplete_Class":%d:{s:27:"__PHP_Incomplete_Class_Name";%s', + $leftBorder, + $objectSize + 1, // size of object + 1 for added string + \serialize($className) + ); + } +} diff --git a/libraries/vendor/brumann/polyfill-unserialize/src/Unserialize.php b/libraries/vendor/brumann/polyfill-unserialize/src/Unserialize.php index 712e3e5049e..0a3bea74dba 100644 --- a/libraries/vendor/brumann/polyfill-unserialize/src/Unserialize.php +++ b/libraries/vendor/brumann/polyfill-unserialize/src/Unserialize.php @@ -32,28 +32,8 @@ final class Unserialize ); } - $sanitizedSerialized = preg_replace_callback( - '/(^|;)O:\d+:"([^"]*)":(\d+):{/', - function ($match) use ($allowedClasses) { - $completeMatch = (string) array_shift($match); - $leftBorder = (string) array_shift($match); - $className = (string) array_shift($match); - $objectSize = (int) array_shift($match); + $worker = new DisallowedClassesSubstitutor($serialized, $allowedClasses); - if (in_array($className, $allowedClasses, true)) { - return $completeMatch; - } - - return sprintf( - '%sO:22:"__PHP_Incomplete_Class":%d:{s:27:"__PHP_Incomplete_Class_Name";%s', - $leftBorder, - $objectSize + 1, // size of object + 1 for added string - \serialize($className) - ); - }, - $serialized - ); - - return \unserialize($sanitizedSerialized); + return \unserialize($worker->getSubstitutedSerialized()); } } diff --git a/libraries/vendor/composer/ClassLoader.php b/libraries/vendor/composer/ClassLoader.php index fce8549f078..03b9bb9c40c 100644 --- a/libraries/vendor/composer/ClassLoader.php +++ b/libraries/vendor/composer/ClassLoader.php @@ -60,7 +60,7 @@ class ClassLoader public function getPrefixes() { if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); + return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); } return array(); diff --git a/libraries/vendor/composer/autoload_classmap.php b/libraries/vendor/composer/autoload_classmap.php index 95ccba60a0d..d925c3b4d41 100644 --- a/libraries/vendor/composer/autoload_classmap.php +++ b/libraries/vendor/composer/autoload_classmap.php @@ -6,6 +6,7 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname(dirname($vendorDir)); return array( + 'Brumann\\Polyfill\\DisallowedClassesSubstitutor' => $vendorDir . '/brumann/polyfill-unserialize/src/DisallowedClassesSubstitutor.php', 'Brumann\\Polyfill\\Unserialize' => $vendorDir . '/brumann/polyfill-unserialize/src/Unserialize.php', 'CallbackFilterIterator' => $vendorDir . '/joomla/compat/src/CallbackFilterIterator.php', 'EasyPeasyICS' => $vendorDir . '/phpmailer/phpmailer/extras/EasyPeasyICS.php', @@ -127,6 +128,9 @@ return array( 'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php', 'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php', 'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php', + 'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php', + 'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', + 'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php', 'ReCaptcha\\ReCaptcha' => $vendorDir . '/google/recaptcha/src/ReCaptcha/ReCaptcha.php', 'ReCaptcha\\RequestMethod' => $vendorDir . '/google/recaptcha/src/ReCaptcha/RequestMethod.php', 'ReCaptcha\\RequestMethod\\Curl' => $vendorDir . '/google/recaptcha/src/ReCaptcha/RequestMethod/Curl.php', @@ -189,6 +193,11 @@ return array( 'Symfony\\Polyfill\\Util\\Binary' => $vendorDir . '/symfony/polyfill-util/Binary.php', 'Symfony\\Polyfill\\Util\\BinaryNoFuncOverload' => $vendorDir . '/symfony/polyfill-util/BinaryNoFuncOverload.php', 'Symfony\\Polyfill\\Util\\BinaryOnFuncOverload' => $vendorDir . '/symfony/polyfill-util/BinaryOnFuncOverload.php', + 'Symfony\\Polyfill\\Util\\TestListener' => $vendorDir . '/symfony/polyfill-util/TestListener.php', + 'Symfony\\Polyfill\\Util\\TestListenerForV5' => $vendorDir . '/symfony/polyfill-util/TestListenerForV5.php', + 'Symfony\\Polyfill\\Util\\TestListenerForV6' => $vendorDir . '/symfony/polyfill-util/TestListenerForV6.php', + 'Symfony\\Polyfill\\Util\\TestListenerForV7' => $vendorDir . '/symfony/polyfill-util/TestListenerForV7.php', + 'Symfony\\Polyfill\\Util\\TestListenerTrait' => $vendorDir . '/symfony/polyfill-util/TestListenerTrait.php', 'TYPO3\\PharStreamWrapper\\Assertable' => $vendorDir . '/typo3/phar-stream-wrapper/src/Assertable.php', 'TYPO3\\PharStreamWrapper\\Behavior' => $vendorDir . '/typo3/phar-stream-wrapper/src/Behavior.php', 'TYPO3\\PharStreamWrapper\\Collectable' => $vendorDir . '/typo3/phar-stream-wrapper/src/Collectable.php', diff --git a/libraries/vendor/composer/autoload_real.php b/libraries/vendor/composer/autoload_real.php index f3a91b2e20d..2c18d3f8d19 100644 --- a/libraries/vendor/composer/autoload_real.php +++ b/libraries/vendor/composer/autoload_real.php @@ -13,6 +13,9 @@ class ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee67ffe } } + /** + * @return \Composer\Autoload\ClassLoader + */ public static function getLoader() { if (null !== self::$loader) { diff --git a/libraries/vendor/composer/autoload_static.php b/libraries/vendor/composer/autoload_static.php index 0d67159b4ee..e7144b91e39 100644 --- a/libraries/vendor/composer/autoload_static.php +++ b/libraries/vendor/composer/autoload_static.php @@ -209,6 +209,7 @@ class ComposerStaticInit205c915b9c7d3e718e7c95793ee67ffe ); public static $classMap = array ( + 'Brumann\\Polyfill\\DisallowedClassesSubstitutor' => __DIR__ . '/..' . '/brumann/polyfill-unserialize/src/DisallowedClassesSubstitutor.php', 'Brumann\\Polyfill\\Unserialize' => __DIR__ . '/..' . '/brumann/polyfill-unserialize/src/Unserialize.php', 'CallbackFilterIterator' => __DIR__ . '/..' . '/joomla/compat/src/CallbackFilterIterator.php', 'EasyPeasyICS' => __DIR__ . '/..' . '/phpmailer/phpmailer/extras/EasyPeasyICS.php', @@ -330,6 +331,9 @@ class ComposerStaticInit205c915b9c7d3e718e7c95793ee67ffe 'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php', 'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php', 'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php', + 'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php', + 'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php', + 'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php', 'ReCaptcha\\ReCaptcha' => __DIR__ . '/..' . '/google/recaptcha/src/ReCaptcha/ReCaptcha.php', 'ReCaptcha\\RequestMethod' => __DIR__ . '/..' . '/google/recaptcha/src/ReCaptcha/RequestMethod.php', 'ReCaptcha\\RequestMethod\\Curl' => __DIR__ . '/..' . '/google/recaptcha/src/ReCaptcha/RequestMethod/Curl.php', @@ -392,6 +396,11 @@ class ComposerStaticInit205c915b9c7d3e718e7c95793ee67ffe 'Symfony\\Polyfill\\Util\\Binary' => __DIR__ . '/..' . '/symfony/polyfill-util/Binary.php', 'Symfony\\Polyfill\\Util\\BinaryNoFuncOverload' => __DIR__ . '/..' . '/symfony/polyfill-util/BinaryNoFuncOverload.php', 'Symfony\\Polyfill\\Util\\BinaryOnFuncOverload' => __DIR__ . '/..' . '/symfony/polyfill-util/BinaryOnFuncOverload.php', + 'Symfony\\Polyfill\\Util\\TestListener' => __DIR__ . '/..' . '/symfony/polyfill-util/TestListener.php', + 'Symfony\\Polyfill\\Util\\TestListenerForV5' => __DIR__ . '/..' . '/symfony/polyfill-util/TestListenerForV5.php', + 'Symfony\\Polyfill\\Util\\TestListenerForV6' => __DIR__ . '/..' . '/symfony/polyfill-util/TestListenerForV6.php', + 'Symfony\\Polyfill\\Util\\TestListenerForV7' => __DIR__ . '/..' . '/symfony/polyfill-util/TestListenerForV7.php', + 'Symfony\\Polyfill\\Util\\TestListenerTrait' => __DIR__ . '/..' . '/symfony/polyfill-util/TestListenerTrait.php', 'TYPO3\\PharStreamWrapper\\Assertable' => __DIR__ . '/..' . '/typo3/phar-stream-wrapper/src/Assertable.php', 'TYPO3\\PharStreamWrapper\\Behavior' => __DIR__ . '/..' . '/typo3/phar-stream-wrapper/src/Behavior.php', 'TYPO3\\PharStreamWrapper\\Collectable' => __DIR__ . '/..' . '/typo3/phar-stream-wrapper/src/Collectable.php', diff --git a/libraries/vendor/composer/installed.json b/libraries/vendor/composer/installed.json index f9990cc483b..707be2d4ec8 100644 --- a/libraries/vendor/composer/installed.json +++ b/libraries/vendor/composer/installed.json @@ -1,23 +1,23 @@ [ { "name": "brumann/polyfill-unserialize", - "version": "v1.0.4", - "version_normalized": "1.0.4.0", + "version": "v2.0.0", + "version_normalized": "2.0.0.0", "source": { "type": "git", "url": "https://github.com/dbrumann/polyfill-unserialize.git", - "reference": "8ed1cd343ddc134a7ef649aca0aa0fe2a1b45008" + "reference": "46e5c18ee87d8a9b5765ef95468c1ac27bd107bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dbrumann/polyfill-unserialize/zipball/8ed1cd343ddc134a7ef649aca0aa0fe2a1b45008", - "reference": "8ed1cd343ddc134a7ef649aca0aa0fe2a1b45008", + "url": "https://api.github.com/repos/dbrumann/polyfill-unserialize/zipball/46e5c18ee87d8a9b5765ef95468c1ac27bd107bf", + "reference": "46e5c18ee87d8a9b5765ef95468c1ac27bd107bf", "shasum": "" }, "require": { "php": "^5.3|^7.0" }, - "time": "2019-07-14T23:16:24+00:00", + "time": "2020-07-24T10:16:53+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -433,17 +433,17 @@ }, { "name": "joomla/filesystem", - "version": "1.5.2", - "version_normalized": "1.5.2.0", + "version": "1.6.0", + "version_normalized": "1.6.0.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/filesystem.git", - "reference": "d8b8c7aff930b34fad6c850162d145bfc5852ca4" + "reference": "d8801f18db358b0284675381ab4195acd028b420" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/filesystem/zipball/d8b8c7aff930b34fad6c850162d145bfc5852ca4", - "reference": "d8b8c7aff930b34fad6c850162d145bfc5852ca4", + "url": "https://api.github.com/repos/joomla-framework/filesystem/zipball/d8801f18db358b0284675381ab4195acd028b420", + "reference": "d8801f18db358b0284675381ab4195acd028b420", "shasum": "" }, "require": { @@ -459,7 +459,7 @@ "suggest": { "paragonie/random_compat": "Required to use Joomla\\Filesystem\\Path::isOwner()" }, - "time": "2019-10-31T22:04:06+00:00", + "time": "2020-09-02T09:05:23+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -482,21 +482,31 @@ "filesystem", "framework", "joomla" + ], + "funding": [ + { + "url": "https://community.joomla.org/sponsorship-campaigns.html", + "type": "custom" + }, + { + "url": "https://github.com/joomla", + "type": "github" + } ] }, { "name": "joomla/filter", - "version": "1.3.5", - "version_normalized": "1.3.5.0", + "version": "1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/filter.git", - "reference": "ee1d870b5c188056745e1dd3cece21522e2158b8" + "reference": "86fec1be2b545f8c00f899658f87f80b4fc67c81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/filter/zipball/ee1d870b5c188056745e1dd3cece21522e2158b8", - "reference": "ee1d870b5c188056745e1dd3cece21522e2158b8", + "url": "https://api.github.com/repos/joomla-framework/filter/zipball/86fec1be2b545f8c00f899658f87f80b4fc67c81", + "reference": "86fec1be2b545f8c00f899658f87f80b4fc67c81", "shasum": "" }, "require": { @@ -511,7 +521,7 @@ "suggest": { "joomla/language": "Required only if you want to use `OutputFilter::stringURLSafe`." }, - "time": "2018-05-26T15:48:53+00:00", + "time": "2020-06-08T22:31:51+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -690,17 +700,17 @@ }, { "name": "joomla/registry", - "version": "1.6.2", - "version_normalized": "1.6.2.0", + "version": "1.6.3", + "version_normalized": "1.6.3.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/registry.git", - "reference": "182eed3a56b2b7e14cef11fdbc63c253ddcfd924" + "reference": "51c08b18838aaf2104e38c3846e34b4706e83644" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/registry/zipball/182eed3a56b2b7e14cef11fdbc63c253ddcfd924", - "reference": "182eed3a56b2b7e14cef11fdbc63c253ddcfd924", + "url": "https://api.github.com/repos/joomla-framework/registry/zipball/51c08b18838aaf2104e38c3846e34b4706e83644", + "reference": "51c08b18838aaf2104e38c3846e34b4706e83644", "shasum": "" }, "require": { @@ -713,12 +723,12 @@ "joomla/coding-standards": "~2.0@alpha", "joomla/test": "~1.0", "phpunit/phpunit": "^4.8.35|^5.4.3|~6.0", - "symfony/yaml": "~2.0|~3.0|~4.0" + "symfony/yaml": "~2.0|~3.0|~4.0|~5.0" }, "suggest": { "symfony/yaml": "Install symfony/yaml if you require YAML support." }, - "time": "2018-06-06T16:48:30+00:00", + "time": "2019-11-27T16:58:55+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -803,17 +813,17 @@ }, { "name": "joomla/string", - "version": "1.4.3", - "version_normalized": "1.4.3.0", + "version": "1.4.4", + "version_normalized": "1.4.4.0", "source": { "type": "git", "url": "https://github.com/joomla-framework/string.git", - "reference": "fed0eee67f83b68674e8c6542ecfa28390b32fec" + "reference": "5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/joomla-framework/string/zipball/fed0eee67f83b68674e8c6542ecfa28390b32fec", - "reference": "fed0eee67f83b68674e8c6542ecfa28390b32fec", + "url": "https://api.github.com/repos/joomla-framework/string/zipball/5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc", + "reference": "5fc1f6fbd588c4b50e97a019be8e9a2b4b3683fc", "shasum": "" }, "require": { @@ -827,7 +837,7 @@ "suggest": { "ext-mbstring": "For improved processing" }, - "time": "2019-08-07T12:34:12+00:00", + "time": "2020-08-04T10:09:53+00:00", "type": "joomla-package", "extra": { "branch-alias": { @@ -867,6 +877,16 @@ "framework", "joomla", "string" + ], + "funding": [ + { + "url": "https://community.joomla.org/sponsorship-campaigns.html", + "type": "custom" + }, + { + "url": "https://github.com/joomla", + "type": "github" + } ] }, { @@ -1274,23 +1294,23 @@ }, { "name": "psr/log", - "version": "1.1.1", - "version_normalized": "1.1.1.0", + "version": "1.1.3", + "version_normalized": "1.1.3.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2" + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2", - "reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", "shasum": "" }, "require": { "php": ">=5.3.0" }, - "time": "2019-10-25T08:06:51+00:00", + "time": "2020-03-23T09:12:05+00:00", "type": "library", "extra": { "branch-alias": { @@ -1379,17 +1399,17 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", - "version_normalized": "1.12.0.0", + "version": "v1.18.1", + "version_normalized": "1.18.1.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { @@ -1398,11 +1418,15 @@ "suggest": { "ext-ctype": "For best performance" }, - "time": "2019-08-06T08:03:45+00:00", + "time": "2020-07-14T12:35:20+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "installation-source": "dist", @@ -1435,32 +1459,50 @@ "ctype", "polyfill", "portable" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ] }, { "name": "symfony/polyfill-php55", - "version": "v1.12.0", - "version_normalized": "1.12.0.0", + "version": "v1.18.1", + "version_normalized": "1.18.1.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php55.git", - "reference": "548bb39407e78e54f785b4e18c7e0d5d9e493265" + "reference": "9c769895334a63971244ee25d0ac71660aa07723" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/548bb39407e78e54f785b4e18c7e0d5d9e493265", - "reference": "548bb39407e78e54f785b4e18c7e0d5d9e493265", + "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/9c769895334a63971244ee25d0ac71660aa07723", + "reference": "9c769895334a63971244ee25d0ac71660aa07723", "shasum": "" }, "require": { "ircmaxell/password-compat": "~1.0", "php": ">=5.3.3" }, - "time": "2019-08-06T08:03:45+00:00", + "time": "2020-07-14T12:35:20+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "installation-source": "dist", @@ -1493,32 +1535,50 @@ "polyfill", "portable", "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ] }, { "name": "symfony/polyfill-php56", - "version": "v1.12.0", - "version_normalized": "1.12.0.0", + "version": "v1.18.1", + "version_normalized": "1.18.1.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "0e3b212e96a51338639d8ce175c046d7729c3403" + "reference": "13df84e91cd168f247c2f2ec82cc0fa24901c011" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/0e3b212e96a51338639d8ce175c046d7729c3403", - "reference": "0e3b212e96a51338639d8ce175c046d7729c3403", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/13df84e91cd168f247c2f2ec82cc0fa24901c011", + "reference": "13df84e91cd168f247c2f2ec82cc0fa24901c011", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-util": "~1.0" }, - "time": "2019-08-06T08:03:45+00:00", + "time": "2020-07-14T12:35:20+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "installation-source": "dist", @@ -1551,31 +1611,49 @@ "polyfill", "portable", "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ] }, { "name": "symfony/polyfill-php71", - "version": "v1.12.0", - "version_normalized": "1.12.0.0", + "version": "v1.18.1", + "version_normalized": "1.18.1.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php71.git", - "reference": "834c714efee3a035533690e3dbc7caa771125d72" + "reference": "28b8b32d6905857a82597d9a0b3463a264e9d367" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php71/zipball/834c714efee3a035533690e3dbc7caa771125d72", - "reference": "834c714efee3a035533690e3dbc7caa771125d72", + "url": "https://api.github.com/repos/symfony/polyfill-php71/zipball/28b8b32d6905857a82597d9a0b3463a264e9d367", + "reference": "28b8b32d6905857a82597d9a0b3463a264e9d367", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2019-08-06T08:03:45+00:00", + "time": "2020-07-14T12:35:20+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "installation-source": "dist", @@ -1608,31 +1686,49 @@ "polyfill", "portable", "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ] }, { "name": "symfony/polyfill-php73", - "version": "v1.12.0", - "version_normalized": "1.12.0.0", + "version": "v1.18.1", + "version_normalized": "1.18.1.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188" + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2019-08-06T08:03:45+00:00", + "time": "2020-07-14T12:35:20+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "installation-source": "dist", @@ -1668,31 +1764,49 @@ "polyfill", "portable", "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ] }, { "name": "symfony/polyfill-util", - "version": "v1.12.0", - "version_normalized": "1.12.0.0", + "version": "v1.18.1", + "version_normalized": "1.18.1.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "4317de1386717b4c22caed7725350a8887ab205c" + "reference": "46b910c71e9828f8ec2aa7a0314de1130d9b295a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/4317de1386717b4c22caed7725350a8887ab205c", - "reference": "4317de1386717b4c22caed7725350a8887ab205c", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/46b910c71e9828f8ec2aa7a0314de1130d9b295a", + "reference": "46b910c71e9828f8ec2aa7a0314de1130d9b295a", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2019-08-06T08:03:45+00:00", + "time": "2020-07-14T12:35:20+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "installation-source": "dist", @@ -1722,12 +1836,26 @@ "compatibility", "polyfill", "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ] }, { "name": "symfony/yaml", - "version": "v2.8.50", - "version_normalized": "2.8.50.0", + "version": "v2.8.52", + "version_normalized": "2.8.52.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -1778,23 +1906,23 @@ }, { "name": "typo3/phar-stream-wrapper", - "version": "v2.1.3", - "version_normalized": "2.1.3.0", + "version": "v2.2.0", + "version_normalized": "2.2.0.0", "source": { "type": "git", "url": "https://github.com/TYPO3/phar-stream-wrapper.git", - "reference": "e8a656d72028b97ab9f61ed993734f3cded02eeb" + "reference": "5e6269b8a54c5fe82322692f26f10dcd5e4532a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TYPO3/phar-stream-wrapper/zipball/e8a656d72028b97ab9f61ed993734f3cded02eeb", - "reference": "e8a656d72028b97ab9f61ed993734f3cded02eeb", + "url": "https://api.github.com/repos/TYPO3/phar-stream-wrapper/zipball/5e6269b8a54c5fe82322692f26f10dcd5e4532a1", + "reference": "5e6269b8a54c5fe82322692f26f10dcd5e4532a1", "shasum": "" }, "require": { - "brumann/polyfill-unserialize": "^1.0", + "brumann/polyfill-unserialize": "^1.0 || ^2.0", "ext-json": "*", - "php": "^5.3.3|^7.0" + "php": "^5.3.3 || ^7.0" }, "require-dev": { "ext-xdebug": "*", @@ -1803,7 +1931,7 @@ "suggest": { "ext-fileinfo": "For PHP builtin file type guessing, otherwise uses internal processing" }, - "time": "2019-10-18T11:59:10+00:00", + "time": "2020-07-27T09:17:38+00:00", "type": "library", "installation-source": "source", "autoload": { diff --git a/libraries/vendor/joomla/filesystem/src/Buffer.php b/libraries/vendor/joomla/filesystem/src/Buffer.php index 9c463943cd9..28609484815 100644 --- a/libraries/vendor/joomla/filesystem/src/Buffer.php +++ b/libraries/vendor/joomla/filesystem/src/Buffer.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -147,7 +147,7 @@ class Buffer { switch ($whence) { - case SEEK_SET: + case \SEEK_SET: if ($offset < \strlen($this->buffers[$this->name]) && $offset >= 0) { $this->position = $offset; @@ -157,7 +157,7 @@ class Buffer return false; - case SEEK_CUR: + case \SEEK_CUR: if ($offset >= 0) { $this->position += $offset; @@ -167,7 +167,7 @@ class Buffer return false; - case SEEK_END: + case \SEEK_END: if (\strlen($this->buffers[$this->name]) + $offset >= 0) { $this->position = \strlen($this->buffers[$this->name]) + $offset; diff --git a/libraries/vendor/joomla/filesystem/src/Clients/FtpClient.php b/libraries/vendor/joomla/filesystem/src/Clients/FtpClient.php index 52dd0120090..c6b2e854937 100644 --- a/libraries/vendor/joomla/filesystem/src/Clients/FtpClient.php +++ b/libraries/vendor/joomla/filesystem/src/Clients/FtpClient.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -56,56 +56,74 @@ if (!\defined('FTP_NATIVE')) class FtpClient { /** - * @var resource Socket resource + * Socket resource + * + * @var resource * @since 1.0 */ private $conn; /** - * @var resource Data port connection resource + * Data port connection resource + * + * @var resource * @since 1.0 */ private $dataconn; /** - * @var array Passive connection information + * Passive connection information + * + * @var array * @since 1.0 */ private $pasv; /** - * @var string Response Message + * Response Message + * + * @var string * @since 1.0 */ private $response; /** - * @var integer Response Code + * Response Code + * + * @var integer * @since 1.0 */ private $responseCode; /** - * @var string Response Message + * Response Message + * + * @var string * @since 1.0 */ private $responseMsg; /** - * @var integer Timeout limit + * Timeout limit + * + * @var integer * @since 1.0 */ private $timeout = 15; /** - * @var integer Transfer Type + * Transfer Type + * + * @var integer * @since 1.0 */ private $type; /** - * @var array Array to hold ascii format file extensions - * @since 1.0 + * Array to hold ascii format file extensions + * + * @var array + * @since 1.0 */ private $autoAscii = array( 'asp', @@ -140,7 +158,9 @@ class FtpClient private $lineEndings = array('UNIX' => "\n", 'WIN' => "\r\n"); /** - * @var FtpClient[] FtpClient instances container. + * FtpClient instances container. + * + * @var FtpClient[] * @since 1.0 */ protected static $instances = array(); @@ -157,7 +177,7 @@ class FtpClient // If default transfer type is not set, set it to autoascii detect if (!isset($options['type'])) { - $options['type'] = FTP_BINARY; + $options['type'] = \FTP_BINARY; } $this->setOptions($options); @@ -288,7 +308,7 @@ class FtpClient } // Set the timeout for this connection - ftp_set_option($this->conn, FTP_TIMEOUT_SEC, $this->timeout); + ftp_set_option($this->conn, \FTP_TIMEOUT_SEC, $this->timeout); return true; } @@ -793,7 +813,7 @@ class FtpClient $buffer = fopen('buffer://tmp', 'r'); - if (@ftp_fput($this->conn, $path, $buffer, FTP_ASCII) === false) + if (@ftp_fput($this->conn, $path, $buffer, \FTP_ASCII) === false) { fclose($buffer); @@ -910,7 +930,7 @@ class FtpClient fclose($this->dataconn); // Let's try to cleanup some line endings if it is ascii - if ($mode == FTP_ASCII) + if ($mode == \FTP_ASCII) { $os = 'UNIX'; @@ -1299,7 +1319,7 @@ class FtpClient ); } - $data = preg_split('/[' . CRLF . ']+/', $data, -1, PREG_SPLIT_NO_EMPTY); + $data = preg_split('/[' . CRLF . ']+/', $data, -1, \PREG_SPLIT_NO_EMPTY); $data = preg_replace('#^' . preg_quote(substr($path, 1), '#') . '[/\\\\]?#', '', $data); if ($keys = array_merge(array_keys($data, '.'), array_keys($data, '..'))) @@ -1740,20 +1760,20 @@ class FtpClient if (\in_array($ext, $this->autoAscii)) { - $mode = FTP_ASCII; + $mode = \FTP_ASCII; } else { - $mode = FTP_BINARY; + $mode = \FTP_BINARY; } } - elseif ($this->type == FTP_ASCII) + elseif ($this->type == \FTP_ASCII) { - $mode = FTP_ASCII; + $mode = \FTP_ASCII; } else { - $mode = FTP_BINARY; + $mode = \FTP_BINARY; } return $mode; @@ -1772,7 +1792,7 @@ class FtpClient */ protected function _mode($mode) { - if ($mode == FTP_BINARY) + if ($mode == \FTP_BINARY) { if (!$this->_putCmd('TYPE I', 200)) { diff --git a/libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php b/libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php index 28cb6b9d430..05cdbccf2c5 100644 --- a/libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php +++ b/libraries/vendor/joomla/filesystem/src/Exception/FilesystemException.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/filesystem/src/File.php b/libraries/vendor/joomla/filesystem/src/File.php index 9a5d281abc2..04a38e4c190 100644 --- a/libraries/vendor/joomla/filesystem/src/File.php +++ b/libraries/vendor/joomla/filesystem/src/File.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -226,7 +226,7 @@ class File // Set the required flag to only append to the file and not overwrite it if ($appendToFile === true) { - return \is_int(file_put_contents($file, $buffer, FILE_APPEND)); + return \is_int(file_put_contents($file, $buffer, \FILE_APPEND)); } return \is_int(file_put_contents($file, $buffer)); diff --git a/libraries/vendor/joomla/filesystem/src/Folder.php b/libraries/vendor/joomla/filesystem/src/Folder.php index 9ba3a711bf4..a5181912a19 100644 --- a/libraries/vendor/joomla/filesystem/src/Folder.php +++ b/libraries/vendor/joomla/filesystem/src/Folder.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -42,8 +42,8 @@ abstract class Folder } // Eliminate trailing directory separators, if any - $src = rtrim($src, DIRECTORY_SEPARATOR); - $dest = rtrim($dest, DIRECTORY_SEPARATOR); + $src = rtrim($src, \DIRECTORY_SEPARATOR); + $dest = rtrim($dest, \DIRECTORY_SEPARATOR); if (!is_dir(Path::clean($src))) { diff --git a/libraries/vendor/joomla/filesystem/src/Helper.php b/libraries/vendor/joomla/filesystem/src/Helper.php index 96bb62d0a88..5b8cf027b1c 100644 --- a/libraries/vendor/joomla/filesystem/src/Helper.php +++ b/libraries/vendor/joomla/filesystem/src/Helper.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -29,7 +29,7 @@ class Helper */ public static function remotefsize($url) { - $sch = parse_url($url, PHP_URL_SCHEME); + $sch = parse_url($url, \PHP_URL_SCHEME); if (!\in_array($sch, array('http', 'https', 'ftp', 'ftps'), true)) { @@ -40,7 +40,7 @@ class Helper { $headers = @ get_headers($url, 1); - if (!$headers || (!array_key_exists('Content-Length', $headers))) + if (!$headers || (!\array_key_exists('Content-Length', $headers))) { return false; } @@ -50,11 +50,11 @@ class Helper if (\in_array($sch, array('ftp', 'ftps'), true)) { - $server = parse_url($url, PHP_URL_HOST); - $port = parse_url($url, PHP_URL_PORT); - $path = parse_url($url, PHP_URL_PATH); - $user = parse_url($url, PHP_URL_USER); - $pass = parse_url($url, PHP_URL_PASS); + $server = parse_url($url, \PHP_URL_HOST); + $port = parse_url($url, \PHP_URL_PORT); + $path = parse_url($url, \PHP_URL_PATH); + $user = parse_url($url, \PHP_URL_USER); + $pass = parse_url($url, \PHP_URL_PASS); if ((!$server) || (!$path)) { @@ -128,18 +128,18 @@ class Helper */ public static function ftpChmod($url, $mode) { - $sch = parse_url($url, PHP_URL_SCHEME); + $sch = parse_url($url, \PHP_URL_SCHEME); if (($sch != 'ftp') && ($sch != 'ftps')) { return false; } - $server = parse_url($url, PHP_URL_HOST); - $port = parse_url($url, PHP_URL_PORT); - $path = parse_url($url, PHP_URL_PATH); - $user = parse_url($url, PHP_URL_USER); - $pass = parse_url($url, PHP_URL_PASS); + $server = parse_url($url, \PHP_URL_HOST); + $port = parse_url($url, \PHP_URL_PORT); + $path = parse_url($url, \PHP_URL_PATH); + $user = parse_url($url, \PHP_URL_USER); + $pass = parse_url($url, \PHP_URL_PASS); if ((!$server) || (!$path)) { diff --git a/libraries/vendor/joomla/filesystem/src/Patcher.php b/libraries/vendor/joomla/filesystem/src/Patcher.php index 54ca8d734ff..fc3d7e0053d 100644 --- a/libraries/vendor/joomla/filesystem/src/Patcher.php +++ b/libraries/vendor/joomla/filesystem/src/Patcher.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -18,50 +18,72 @@ class Patcher { /** * Regular expression for searching source files + * + * @var string + * @since 1.0 */ const SRC_FILE = '/^---\\s+(\\S+)\s+\\d{1,4}-\\d{1,2}-\\d{1,2}\\s+\\d{1,2}:\\d{1,2}:\\d{1,2}(\\.\\d+)?\\s+(\+|-)\\d{4}/A'; /** * Regular expression for searching destination files + * + * @var string + * @since 1.0 */ const DST_FILE = '/^\\+\\+\\+\\s+(\\S+)\s+\\d{1,4}-\\d{1,2}-\\d{1,2}\\s+\\d{1,2}:\\d{1,2}:\\d{1,2}(\\.\\d+)?\\s+(\+|-)\\d{4}/A'; /** * Regular expression for searching hunks of differences + * + * @var string + * @since 1.0 */ const HUNK = '/@@ -(\\d+)(,(\\d+))?\\s+\\+(\\d+)(,(\\d+))?\\s+@@($)/A'; /** * Regular expression for splitting lines + * + * @var string + * @since 1.0 */ const SPLIT = '/(\r\n)|(\r)|(\n)/'; /** - * @var array sources files + * Source files + * + * @var array * @since 1.0 */ protected $sources = array(); /** - * @var array destination files + * Destination files + * + * @var array * @since 1.0 */ protected $destinations = array(); /** - * @var array removal files + * Removal files + * + * @var array * @since 1.0 */ protected $removals = array(); /** - * @var array patches + * Patches + * + * @var array * @since 1.0 */ protected $patches = array(); /** - * @var array instance of this class + * Singleton instance of this class + * + * @var Patcher * @since 1.0 */ protected static $instance; @@ -235,7 +257,7 @@ class Patcher { $this->patches[] = array( 'udiff' => $udiff, - 'root' => isset($root) ? rtrim($root, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : '', + 'root' => isset($root) ? rtrim($root, \DIRECTORY_SEPARATOR) . \DIRECTORY_SEPARATOR : '', 'strip' => $strip, ); diff --git a/libraries/vendor/joomla/filesystem/src/Path.php b/libraries/vendor/joomla/filesystem/src/Path.php index 38c304f7489..6bd17c7d63b 100644 --- a/libraries/vendor/joomla/filesystem/src/Path.php +++ b/libraries/vendor/joomla/filesystem/src/Path.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -213,7 +213,7 @@ class Path * @since 1.0 * @throws \UnexpectedValueException If $path is not a string. */ - public static function clean($path, $ds = DIRECTORY_SEPARATOR) + public static function clean($path, $ds = \DIRECTORY_SEPARATOR) { if (!\is_string($path)) { @@ -340,4 +340,49 @@ class Path // Could not find the file in the set of paths return false; } + + /** + * Resolves /./, /../ and multiple / in a string and returns the resulting absolute path, inspired by Flysystem + * Removes trailing slashes + * + * @param string $path A path to resolve + * + * @return string The resolved path + * + * @since 1.6.0 + */ + public static function resolve($path) + { + $path = static::clean($path); + + // Save start character for absolute path + $startCharacter = ($path[0] === DIRECTORY_SEPARATOR) ? DIRECTORY_SEPARATOR : ''; + + $parts = array(); + + foreach (explode(DIRECTORY_SEPARATOR, $path) as $part) + { + switch ($part) + { + case '': + case '.': + break; + + case '..': + if (empty($parts)) + { + throw new FilesystemException('Path is outside of the defined root'); + } + + array_pop($parts); + break; + + default: + $parts[] = $part; + break; + } + } + + return $startCharacter . implode(DIRECTORY_SEPARATOR, $parts); + } } diff --git a/libraries/vendor/joomla/filesystem/src/Stream.php b/libraries/vendor/joomla/filesystem/src/Stream.php index 672e6cd75b4..9990d36ec73 100644 --- a/libraries/vendor/joomla/filesystem/src/Stream.php +++ b/libraries/vendor/joomla/filesystem/src/Stream.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -249,7 +249,7 @@ class Stream } elseif ($detectprocessingmode) { - $ext = strtolower(pathinfo($this->filename, PATHINFO_EXTENSION)); + $ext = strtolower(pathinfo($this->filename, \PATHINFO_EXTENSION)); switch ($ext) { @@ -668,7 +668,7 @@ class Stream * @since 1.0 * @throws FilesystemException */ - public function seek($offset, $whence = SEEK_SET) + public function seek($offset, $whence = \SEEK_SET) { if (!$this->fh) { @@ -881,7 +881,7 @@ class Stream $php_errormsg = ''; $trackErrors = ini_get('track_errors'); ini_set('track_errors', true); - $sch = parse_url($filename, PHP_URL_SCHEME); + $sch = parse_url($filename, \PHP_URL_SCHEME); // Scheme specific options; ftp's chmod support is fun. switch ($sch) @@ -1071,7 +1071,7 @@ class Stream * @since 1.0 * @throws FilesystemException */ - public function appendFilter($filtername, $readWrite = STREAM_FILTER_READ, $params = array()) + public function appendFilter($filtername, $readWrite = \STREAM_FILTER_READ, $params = array()) { $res = false; @@ -1111,7 +1111,7 @@ class Stream * @since 1.0 * @throws FilesystemException */ - public function prependFilter($filtername, $readWrite = STREAM_FILTER_READ, $params = array()) + public function prependFilter($filtername, $readWrite = \STREAM_FILTER_READ, $params = array()) { $res = false; diff --git a/libraries/vendor/joomla/filesystem/src/Stream/String.php b/libraries/vendor/joomla/filesystem/src/Stream/String.php index 57ed442aac6..c88d010804c 100644 --- a/libraries/vendor/joomla/filesystem/src/Stream/String.php +++ b/libraries/vendor/joomla/filesystem/src/Stream/String.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/filesystem/src/Stream/StringWrapper.php b/libraries/vendor/joomla/filesystem/src/Stream/StringWrapper.php index 92665a26d1e..31b7790354a 100644 --- a/libraries/vendor/joomla/filesystem/src/Stream/StringWrapper.php +++ b/libraries/vendor/joomla/filesystem/src/Stream/StringWrapper.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -13,8 +13,7 @@ use Joomla\Filesystem\Support\StringController; /** * String Stream Wrapper * - * This class allows you to use a PHP string in the same way that - * you would normally use a regular stream wrapper + * This class allows you to use a PHP string in the same way that you would normally use a regular stream wrapper * * @since 1.3.0 */ @@ -249,12 +248,12 @@ class StringWrapper switch ($whence) { - case SEEK_SET: + case \SEEK_SET: $this->pos = $offset; break; - case SEEK_CUR: + case \SEEK_CUR: if (($this->pos + $offset) > $this->len) { return false; @@ -264,7 +263,7 @@ class StringWrapper break; - case SEEK_END: + case \SEEK_END: $this->pos = $this->len - $offset; break; diff --git a/libraries/vendor/joomla/filesystem/src/Support/StringController.php b/libraries/vendor/joomla/filesystem/src/Support/StringController.php index 7c5748c45c7..b31d6103889 100644 --- a/libraries/vendor/joomla/filesystem/src/Support/StringController.php +++ b/libraries/vendor/joomla/filesystem/src/Support/StringController.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filesystem Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/filter/src/InputFilter.php b/libraries/vendor/joomla/filter/src/InputFilter.php index 1a17f5204b5..65b2bdda51c 100644 --- a/libraries/vendor/joomla/filter/src/InputFilter.php +++ b/libraries/vendor/joomla/filter/src/InputFilter.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filter Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -23,34 +23,70 @@ class InputFilter /** * Defines the InputFilter instance should use a whitelist method for sanitising tags. * - * @var integer - * @since 1.3.0 + * @var integer + * @since 1.3.0 + * @deprecated 2.0 */ const TAGS_WHITELIST = 0; /** * Defines the InputFilter instance should use a blacklist method for sanitising tags. * - * @var integer - * @since 1.3.0 + * @var integer + * @since 1.3.0 + * @deprecated 2.0 */ const TAGS_BLACKLIST = 1; /** * Defines the InputFilter instance should use a whitelist method for sanitising attributes. * - * @var integer - * @since 1.3.0 + * @var integer + * @since 1.3.0 + * @deprecated 2.0 */ const ATTR_WHITELIST = 0; /** * Defines the InputFilter instance should use a blacklist method for sanitising attributes. * + * @var integer + * @since 1.3.0 + * @deprecated 2.0 + */ + const ATTR_BLACKLIST = 1; + + /** + * Defines the InputFilter instance should only allow the supplied list of HTML tags. + * * @var integer * @since 1.3.0 */ - const ATTR_BLACKLIST = 1; + const ONLY_ALLOW_DEFINED_TAGS = 0; + + /** + * Defines the InputFilter instance should block the defined list of tags and allow all others. + * + * @var integer + * @since 1.3.0 + */ + const ONLY_BLOCK_DEFINED_TAGS = 1; + + /** + * Defines the InputFilter instance should only allow the supplied list of attributes. + * + * @var integer + * @since 1.3.0 + */ + const ONLY_ALLOW_DEFINED_ATTRIBUTES = 0; + + /** + * Defines the InputFilter instance should use a block all attributes. + * + * @var integer + * @since 1.3.0 + */ + const ONLY_BLOCK_DEFINED_ATTRIBUTES = 1; /** * A container for InputFilter instances. @@ -62,7 +98,7 @@ class InputFilter protected static $instances = array(); /** - * The array of permitted tags (whitelist). + * The array of permitted tags. * * @var array * @since 1.0 @@ -70,7 +106,7 @@ class InputFilter public $tagsArray; /** - * The array of permitted tag attributes (whitelist). + * The array of permitted tag attributes. * * @var array * @since 1.0 @@ -94,7 +130,7 @@ class InputFilter public $attrMethod; /** - * A flag for XSS checks. Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1 + * A flag for XSS checks. Only auto clean essentials = 0, Allow clean blocked tags/attr = 1 * * @var integer * @since 1.0 @@ -102,10 +138,11 @@ class InputFilter public $xssAuto; /** - * The list of the default blacklisted tags. + * The list of the default blocked tags. * * @var array * @since 1.0 + * @notes This property will be renamed to $blockedTags in version 2.0 */ public $tagBlacklist = array( 'applet', @@ -138,6 +175,7 @@ class InputFilter * * @var array * @since 1.0 + * @notes This property will be renamed to $blockedAttributes in version 2.0 */ public $attrBlacklist = array( 'action', @@ -149,12 +187,12 @@ class InputFilter ); /** - * A special list of blacklisted chars + * A special list of blocked chars * * @var array * @since 1.3.3 */ - private $blacklistedChars = array( + private $blockedChars = array( '&tab;', '&space;', ':', @@ -166,9 +204,9 @@ class InputFilter * * @param array $tagsArray List of user-defined tags * @param array $attrArray List of user-defined attributes - * @param integer $tagsMethod WhiteList method = 0, BlackList method = 1 - * @param integer $attrMethod WhiteList method = 0, BlackList method = 1 - * @param integer $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1 + * @param integer $tagsMethod The constant static::ONLY_ALLOW_DEFINED_TAGS or static::BLOCK_DEFINED_TAGS + * @param integer $attrMethod The constant static::ONLY_ALLOW_DEFINED_ATTRIBUTES or static::BLOCK_DEFINED_ATTRIBUTES + * @param integer $xssAuto Only auto clean essentials = 0, Allow clean blocked tags/attributes = 1 * * @since 1.0 */ @@ -225,7 +263,7 @@ class InputFilter case 'INTEGER': $pattern = '/[-+]?[0-9]+/'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -247,7 +285,7 @@ class InputFilter case 'UINT': $pattern = '/[-+]?[0-9]+/'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -270,7 +308,7 @@ class InputFilter case 'DOUBLE': $pattern = '/[-+]?[0-9]+(\.[0-9]+)?([eE][-+]?[0-9]+)?/'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -292,7 +330,7 @@ class InputFilter case 'BOOL': case 'BOOLEAN': - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -312,7 +350,7 @@ class InputFilter case 'WORD': $pattern = '/[^A-Z_]/i'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -332,7 +370,7 @@ class InputFilter case 'ALNUM': $pattern = '/[^A-Z0-9]/i'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -352,7 +390,7 @@ class InputFilter case 'CMD': $pattern = '/[^A-Z0-9_\.-]/i'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -374,7 +412,7 @@ class InputFilter case 'BASE64': $pattern = '/[^A-Z0-9\/+=]/i'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -392,7 +430,7 @@ class InputFilter break; case 'STRING': - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -410,7 +448,7 @@ class InputFilter break; case 'HTML': - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -429,12 +467,13 @@ class InputFilter case 'ARRAY': $result = (array) $source; + break; case 'PATH': $pattern = '/^[A-Za-z0-9_\/-]+[A-Za-z0-9_\.-]*([\\\\\/][A-Za-z0-9_-]+[A-Za-z0-9_\.-]*)*$/'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -454,7 +493,7 @@ class InputFilter break; case 'TRIM': - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -462,15 +501,15 @@ class InputFilter foreach ($source as $eachString) { $cleaned = (string) trim($eachString); - $cleaned = StringHelper::trim($cleaned, chr(0xE3) . chr(0x80) . chr(0x80)); - $result[] = StringHelper::trim($cleaned, chr(0xC2) . chr(0xA0)); + $cleaned = StringHelper::trim($cleaned, \chr(0xE3) . \chr(0x80) . \chr(0x80)); + $result[] = StringHelper::trim($cleaned, \chr(0xC2) . \chr(0xA0)); } } else { $result = (string) trim($source); - $result = StringHelper::trim($result, chr(0xE3) . chr(0x80) . chr(0x80)); - $result = StringHelper::trim($result, chr(0xC2) . chr(0xA0)); + $result = StringHelper::trim($result, \chr(0xE3) . \chr(0x80) . \chr(0x80)); + $result = StringHelper::trim($result, \chr(0xC2) . \chr(0xA0)); } break; @@ -478,7 +517,7 @@ class InputFilter case 'USERNAME': $pattern = '/[\x00-\x1F\x7F<>"\'%&]/'; - if (is_array($source)) + if (\is_array($source)) { $result = array(); @@ -497,16 +536,17 @@ class InputFilter case 'RAW': $result = $source; + break; default: // Are we dealing with an array? - if (is_array($source)) + if (\is_array($source)) { foreach ($source as $key => $value) { // Filter element for XSS and other 'bad' code etc. - if (is_string($value)) + if (\is_string($value)) { $source[$key] = $this->remove($this->decode($value)); } @@ -517,7 +557,7 @@ class InputFilter else { // Or a string? - if (is_string($source) && !empty($source)) + if (\is_string($source) && !empty($source)) { // Filter source for XSS and other 'bad' code etc. $result = $this->remove($this->decode($source)); @@ -546,13 +586,13 @@ class InputFilter */ public static function checkAttribute($attrSubSet) { - $quoteStyle = version_compare(PHP_VERSION, '5.4', '>=') ? ENT_QUOTES | ENT_HTML401 : ENT_QUOTES; + $quoteStyle = version_compare(\PHP_VERSION, '5.4', '>=') ? \ENT_QUOTES | \ENT_HTML401 : \ENT_QUOTES; $attrSubSet[0] = strtolower($attrSubSet[0]); $attrSubSet[1] = html_entity_decode(strtolower($attrSubSet[1]), $quoteStyle, 'UTF-8'); - return ((strpos($attrSubSet[1], 'expression') !== false && $attrSubSet[0] === 'style') - || preg_match('/(?:(?:java|vb|live)script|behaviour|mocha)(?::|:|&column;)/', $attrSubSet[1]) !== 0); + return (strpos($attrSubSet[1], 'expression') !== false && $attrSubSet[0] === 'style') + || preg_match('/(?:(?:java|vb|live)script|behaviour|mocha)(?::|:|&column;)/', $attrSubSet[1]) !== 0; } /** @@ -569,7 +609,7 @@ class InputFilter // Iteration provides nested tag protection do { - $temp = $source; + $temp = $source; $source = $this->cleanTags($source); } while ($temp !== $source); @@ -592,8 +632,8 @@ class InputFilter $source = $this->escapeAttributeValues($source); // In the beginning we don't really have a tag, so everything is postTag - $preTag = null; - $postTag = $source; + $preTag = null; + $postTag = $source; $currentSpace = false; // Setting to null to deal with undefined variables @@ -606,9 +646,9 @@ class InputFilter { // Get some information about the tag we are processing $preTag .= StringHelper::substr($postTag, 0, $tagOpenStart); - $postTag = StringHelper::substr($postTag, $tagOpenStart); + $postTag = StringHelper::substr($postTag, $tagOpenStart); $fromTagOpen = StringHelper::substr($postTag, 1); - $tagOpenEnd = StringHelper::strpos($fromTagOpen, '>'); + $tagOpenEnd = StringHelper::strpos($fromTagOpen, '>'); // Check for mal-formed tag where we have a second '<' before the first '>' $nextOpenTag = (StringHelper::strlen($postTag) > $tagOpenStart) ? StringHelper::strpos($postTag, '<', $tagOpenStart + 1) : false; @@ -616,16 +656,18 @@ class InputFilter if (($nextOpenTag !== false) && ($nextOpenTag < $tagOpenEnd)) { // At this point we have a mal-formed tag -- remove the offending open - $postTag = StringHelper::substr($postTag, 0, $tagOpenStart) . StringHelper::substr($postTag, $tagOpenStart + 1); + $postTag = StringHelper::substr($postTag, 0, $tagOpenStart) . StringHelper::substr($postTag, $tagOpenStart + 1); $tagOpenStart = StringHelper::strpos($postTag, '<'); + continue; } // Let's catch any non-terminated tags and skip over them if ($tagOpenEnd === false) { - $postTag = StringHelper::substr($postTag, $tagOpenStart + 1); + $postTag = StringHelper::substr($postTag, $tagOpenStart + 1); $tagOpenStart = StringHelper::strpos($postTag, '<'); + continue; } @@ -635,44 +677,45 @@ class InputFilter if (($tagOpenNested !== false) && ($tagOpenNested < $tagOpenEnd)) { $preTag .= StringHelper::substr($postTag, 0, ($tagOpenNested + 1)); - $postTag = StringHelper::substr($postTag, ($tagOpenNested + 1)); + $postTag = StringHelper::substr($postTag, ($tagOpenNested + 1)); $tagOpenStart = StringHelper::strpos($postTag, '<'); + continue; } // Let's get some information about our tag and setup attribute pairs $tagOpenNested = (StringHelper::strpos($fromTagOpen, '<') + $tagOpenStart + 1); - $currentTag = StringHelper::substr($fromTagOpen, 0, $tagOpenEnd); - $tagLength = StringHelper::strlen($currentTag); - $tagLeft = $currentTag; - $attrSet = array(); - $currentSpace = StringHelper::strpos($tagLeft, ' '); + $currentTag = StringHelper::substr($fromTagOpen, 0, $tagOpenEnd); + $tagLength = StringHelper::strlen($currentTag); + $tagLeft = $currentTag; + $attrSet = array(); + $currentSpace = StringHelper::strpos($tagLeft, ' '); // Are we an open tag or a close tag? if (StringHelper::substr($currentTag, 0, 1) === '/') { // Close Tag - $isCloseTag = true; - list ($tagName) = explode(' ', $currentTag); - $tagName = StringHelper::substr($tagName, 1); + $isCloseTag = true; + list($tagName) = explode(' ', $currentTag); + $tagName = StringHelper::substr($tagName, 1); } else { // Open Tag - $isCloseTag = false; - list ($tagName) = explode(' ', $currentTag); + $isCloseTag = false; + list($tagName) = explode(' ', $currentTag); } /* * Exclude all "non-regular" tagnames * OR no tagname - * OR remove if xssauto is on and tag is blacklisted + * OR remove if xssauto is on and tag is blocked */ - if ((!preg_match("/^[a-z][a-z0-9]*$/i", $tagName)) + if ((!preg_match('/^[a-z][a-z0-9]*$/i', $tagName)) || (!$tagName) - || ((in_array(strtolower($tagName), $this->tagBlacklist)) && ($this->xssAuto))) + || ((\in_array(strtolower($tagName), $this->tagBlacklist)) && ($this->xssAuto))) { - $postTag = StringHelper::substr($postTag, ($tagLength + 2)); + $postTag = StringHelper::substr($postTag, ($tagLength + 2)); $tagOpenStart = StringHelper::strpos($postTag, '<'); // Strip tag @@ -685,30 +728,30 @@ class InputFilter */ while ($currentSpace !== false) { - $attr = ''; - $fromSpace = StringHelper::substr($tagLeft, ($currentSpace + 1)); - $nextEqual = StringHelper::strpos($fromSpace, '='); - $nextSpace = StringHelper::strpos($fromSpace, ' '); - $openQuotes = StringHelper::strpos($fromSpace, '"'); + $attr = ''; + $fromSpace = StringHelper::substr($tagLeft, ($currentSpace + 1)); + $nextEqual = StringHelper::strpos($fromSpace, '='); + $nextSpace = StringHelper::strpos($fromSpace, ' '); + $openQuotes = StringHelper::strpos($fromSpace, '"'); $closeQuotes = StringHelper::strpos(StringHelper::substr($fromSpace, ($openQuotes + 1)), '"') + $openQuotes + 1; - $startAtt = ''; + $startAtt = ''; $startAttPosition = 0; // Find position of equal and open quotes ignoring - if (preg_match('#\s*=\s*\"#', $fromSpace, $matches, PREG_OFFSET_CAPTURE)) + if (preg_match('#\s*=\s*\"#', $fromSpace, $matches, \PREG_OFFSET_CAPTURE)) { // We have found an attribute, convert its byte position to a UTF-8 string length, using non-multibyte substr() $stringBeforeAttr = substr($fromSpace, 0, $matches[0][1]); $startAttPosition = StringHelper::strlen($stringBeforeAttr); - $startAtt = $matches[0][0]; - $closeQuotePos = StringHelper::strpos( + $startAtt = $matches[0][0]; + $closeQuotePos = StringHelper::strpos( StringHelper::substr($fromSpace, ($startAttPosition + StringHelper::strlen($startAtt))), '"' ); $closeQuotes = $closeQuotePos + $startAttPosition + StringHelper::strlen($startAtt); - $nextEqual = $startAttPosition + StringHelper::strpos($startAtt, '='); - $openQuotes = $startAttPosition + StringHelper::strpos($startAtt, '"'); - $nextSpace = StringHelper::strpos(StringHelper::substr($fromSpace, $closeQuotes), ' ') + $closeQuotes; + $nextEqual = $startAttPosition + StringHelper::strpos($startAtt, '='); + $openQuotes = $startAttPosition + StringHelper::strpos($startAtt, '"'); + $nextSpace = StringHelper::strpos(StringHelper::substr($fromSpace, $closeQuotes), ' ') + $closeQuotes; } // Do we have an attribute to process? [check for equal sign] @@ -747,8 +790,8 @@ class InputFilter } } else - // No more equal signs so add any extra text in the tag into the attribute array [eg. checked] { + // No more equal signs so add any extra text in the tag into the attribute array [eg. checked] if ($fromSpace !== '/') { $attr = StringHelper::substr($fromSpace, 0, $nextSpace); @@ -765,12 +808,12 @@ class InputFilter $attrSet[] = $attr; // Move search point and continue iteration - $tagLeft = StringHelper::substr($fromSpace, StringHelper::strlen($attr)); + $tagLeft = StringHelper::substr($fromSpace, StringHelper::strlen($attr)); $currentSpace = StringHelper::strpos($tagLeft, ' '); } // Is our tag in the user input array? - $tagFound = in_array(strtolower($tagName), $this->tagsArray); + $tagFound = \in_array(strtolower($tagName), $this->tagsArray); // If the tag is allowed let's append it to the output string. if ((!$tagFound && $this->tagsMethod) || ($tagFound && !$this->tagsMethod)) @@ -782,7 +825,7 @@ class InputFilter $attrSet = $this->cleanAttributes($attrSet); $preTag .= '<' . $tagName; - for ($i = 0, $count = count($attrSet); $i < $count; $i++) + for ($i = 0, $count = \count($attrSet); $i < $count; $i++) { $preTag .= ' ' . $attrSet[$i]; } @@ -798,14 +841,14 @@ class InputFilter } } else - // Closing tag { + // Closing tag $preTag .= ''; } } // Find next tag's start and continue iteration - $postTag = StringHelper::substr($postTag, ($tagLength + 2)); + $postTag = StringHelper::substr($postTag, ($tagLength + 2)); $tagOpenStart = StringHelper::strpos($postTag, '<'); } @@ -831,7 +874,7 @@ class InputFilter { $newSet = array(); - $count = count($attrSet); + $count = \count($attrSet); // Iterate through attribute pairs for ($i = 0; $i < $count; $i++) @@ -850,26 +893,26 @@ class InputFilter $attrSubSet[0] = array_pop($attrSubSet0); $attrSubSet[0] = strtolower($attrSubSet[0]); - $quoteStyle = version_compare(PHP_VERSION, '5.4', '>=') ? ENT_QUOTES | ENT_HTML401 : ENT_QUOTES; + $quoteStyle = version_compare(\PHP_VERSION, '5.4', '>=') ? \ENT_QUOTES | \ENT_HTML401 : \ENT_QUOTES; // Remove all spaces as valid attributes does not have spaces. $attrSubSet[0] = html_entity_decode($attrSubSet[0], $quoteStyle, 'UTF-8'); $attrSubSet[0] = preg_replace('/^[\pZ\pC]+|[\pZ\pC]+$/u', '', $attrSubSet[0]); $attrSubSet[0] = preg_replace('/\s+/u', '', $attrSubSet[0]); - // Remove blacklisted chars from the attribute name - foreach ($this->blacklistedChars as $blacklistedChar) + // Remove blocked chars from the attribute name + foreach ($this->blockedChars as $blockedChar) { - $attrSubSet[0] = str_ireplace($blacklistedChar, '', $attrSubSet[0]); + $attrSubSet[0] = str_ireplace($blockedChar, '', $attrSubSet[0]); } // Remove all symbols $attrSubSet[0] = preg_replace('/[^\p{L}\p{N}\-\s]/u', '', $attrSubSet[0]); // Remove all "non-regular" attribute names - // AND blacklisted attributes + // AND blocked attributes if ((!preg_match('/[a-z]*$/i', $attrSubSet[0])) - || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) + || (($this->xssAuto) && ((\in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) || (substr($attrSubSet[0], 0, 2) == 'on')))) { continue; @@ -881,10 +924,10 @@ class InputFilter continue; } - // Remove blacklisted chars from the attribute value - foreach ($this->blacklistedChars as $blacklistedChar) + // Remove blocked chars from the attribute value + foreach ($this->blockedChars as $blockedChar) { - $attrSubSet[1] = str_ireplace($blacklistedChar, '', $attrSubSet[1]); + $attrSubSet[1] = str_ireplace($blockedChar, '', $attrSubSet[1]); } // Trim leading and trailing spaces @@ -900,9 +943,9 @@ class InputFilter $attrSubSet[1] = str_replace('"', '', $attrSubSet[1]); // Convert single quotes from either side to doubles (Single quotes shouldn't be used to pad attr values) - if ((substr($attrSubSet[1], 0, 1) == "'") && (substr($attrSubSet[1], (strlen($attrSubSet[1]) - 1), 1) == "'")) + if ((substr($attrSubSet[1], 0, 1) == "'") && (substr($attrSubSet[1], (\strlen($attrSubSet[1]) - 1), 1) == "'")) { - $attrSubSet[1] = substr($attrSubSet[1], 1, (strlen($attrSubSet[1]) - 2)); + $attrSubSet[1] = substr($attrSubSet[1], 1, (\strlen($attrSubSet[1]) - 2)); } // Strip slashes @@ -915,7 +958,7 @@ class InputFilter } // Is our attribute in the user input array? - $attrFound = in_array(strtolower($attrSubSet[0]), $this->attrArray); + $attrFound = \in_array(strtolower($attrSubSet[0]), $this->attrArray); // If the tag is allowed lets keep it if ((!$attrFound && $this->attrMethod) || ($attrFound && !$this->attrMethod)) @@ -925,7 +968,7 @@ class InputFilter { $newSet[] = $attrSubSet[0] . '="' . $attrSubSet[1] . '"'; } - elseif ($attrSubSet[1] === "0") + elseif ($attrSubSet[1] === '0') { // Special Case // Is the value 0? @@ -954,7 +997,7 @@ class InputFilter */ protected function decode($source) { - return html_entity_decode($source, ENT_QUOTES, 'UTF-8'); + return html_entity_decode($source, \ENT_QUOTES, 'UTF-8'); } /** @@ -969,35 +1012,35 @@ class InputFilter protected function escapeAttributeValues($source) { $alreadyFiltered = ''; - $remainder = $source; - $badChars = array('<', '"', '>'); - $escapedChars = array('<', '"', '>'); + $remainder = $source; + $badChars = array('<', '"', '>'); + $escapedChars = array('<', '"', '>'); // Process each portion based on presence of =" and ", "/>, or "> // See if there are any more attributes to process - while (preg_match('#<[^>]*?=\s*?(\"|\')#s', $remainder, $matches, PREG_OFFSET_CAPTURE)) + while (preg_match('#<[^>]*?=\s*?(\"|\')#s', $remainder, $matches, \PREG_OFFSET_CAPTURE)) { // We have found a tag with an attribute, convert its byte position to a UTF-8 string length, using non-multibyte substr() $stringBeforeTag = substr($remainder, 0, $matches[0][1]); - $tagPosition = StringHelper::strlen($stringBeforeTag); + $tagPosition = StringHelper::strlen($stringBeforeTag); // Get the character length before the attribute value $nextBefore = $tagPosition + StringHelper::strlen($matches[0][0]); // Figure out if we have a single or double quote and look for the matching closing quote // Closing quote should be "/>, ">, ", or " at the end of the string - $quote = StringHelper::substr($matches[0][0], -1); + $quote = StringHelper::substr($matches[0][0], -1); $pregMatch = ($quote == '"') ? '#(\"\s*/\s*>|\"\s*>|\"\s+|\"$)#' : "#(\'\s*/\s*>|\'\s*>|\'\s+|\'$)#"; // Get the portion after attribute value $attributeValueRemainder = StringHelper::substr($remainder, $nextBefore); - if (preg_match($pregMatch, $attributeValueRemainder, $matches, PREG_OFFSET_CAPTURE)) + if (preg_match($pregMatch, $attributeValueRemainder, $matches, \PREG_OFFSET_CAPTURE)) { // We have a closing quote, convert its byte position to a UTF-8 string length, using non-multibyte substr() $stringBeforeQuote = substr($attributeValueRemainder, 0, $matches[0][1]); - $closeQuoteChars = StringHelper::strlen($stringBeforeQuote); - $nextAfter = $nextBefore + $matches[0][1]; + $closeQuoteChars = StringHelper::strlen($stringBeforeQuote); + $nextAfter = $nextBefore + $matches[0][1]; } else { diff --git a/libraries/vendor/joomla/filter/src/OutputFilter.php b/libraries/vendor/joomla/filter/src/OutputFilter.php index 8ca20e4e8c8..bf5ac80cf90 100644 --- a/libraries/vendor/joomla/filter/src/OutputFilter.php +++ b/libraries/vendor/joomla/filter/src/OutputFilter.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Filter Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -32,22 +32,23 @@ class OutputFilter * * @since 1.0 */ - public static function objectHtmlSafe(&$mixed, $quoteStyle = ENT_QUOTES, $excludeKeys = '') + public static function objectHtmlSafe(&$mixed, $quoteStyle = \ENT_QUOTES, $excludeKeys = '') { - if (is_object($mixed)) + if (\is_object($mixed)) { foreach (get_object_vars($mixed) as $k => $v) { - if (is_array($v) || is_object($v) || $v == null || substr($k, 1, 1) == '_') + if (\is_array($v) || \is_object($v) || $v == null || substr($k, 1, 1) == '_') { continue; } - if (is_string($excludeKeys) && $k == $excludeKeys) + if (\is_string($excludeKeys) && $k == $excludeKeys) { continue; } - elseif (is_array($excludeKeys) && in_array($k, $excludeKeys)) + + if (\is_array($excludeKeys) && \in_array($k, $excludeKeys)) { continue; } @@ -98,7 +99,7 @@ class OutputFilter // Transliterate on the language requested (fallback to current language if not specified) $lang = empty($language) ? Language::getInstance() : Language::getInstance($language); - $str = $lang->transliterate($str); + $str = $lang->transliterate($str); // Trim white spaces at beginning and end of alias and make lowercase $str = trim(StringHelper::strtolower($str)); @@ -179,7 +180,7 @@ class OutputFilter $text = preg_replace('/&/', ' ', $text); $text = preg_replace('/"/', ' ', $text); $text = strip_tags($text); - $text = htmlspecialchars($text, ENT_COMPAT, 'UTF-8'); + $text = htmlspecialchars($text, \ENT_COMPAT, 'UTF-8'); return $text; } diff --git a/libraries/vendor/joomla/registry/src/AbstractRegistryFormat.php b/libraries/vendor/joomla/registry/src/AbstractRegistryFormat.php index b08cb051af3..38fa5e90292 100644 --- a/libraries/vendor/joomla/registry/src/AbstractRegistryFormat.php +++ b/libraries/vendor/joomla/registry/src/AbstractRegistryFormat.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/registry/src/Factory.php b/libraries/vendor/joomla/registry/src/Factory.php index 6de86a507a1..ad8e16ff76d 100644 --- a/libraries/vendor/joomla/registry/src/Factory.php +++ b/libraries/vendor/joomla/registry/src/Factory.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/registry/src/Format/Ini.php b/libraries/vendor/joomla/registry/src/Format/Ini.php index 1d96244f555..ca18b76a42b 100644 --- a/libraries/vendor/joomla/registry/src/Format/Ini.php +++ b/libraries/vendor/joomla/registry/src/Format/Ini.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -62,7 +62,7 @@ class Ini extends AbstractRegistryFormat $variables = get_object_vars($object); - $last = count($variables); + $last = \count($variables); // Assume that the first element is in section $inSection = true; @@ -71,7 +71,7 @@ class Ini extends AbstractRegistryFormat foreach ($variables as $key => $value) { // If the value is an object then we need to put it in a local section. - if (is_object($value)) + if (\is_object($value)) { // Add an empty line if previous string wasn't in a section if (!$inSection) @@ -85,7 +85,7 @@ class Ini extends AbstractRegistryFormat // Add the properties for this section. foreach (get_object_vars($value) as $k => $v) { - if (is_array($v) && $supportArrayValues) + if (\is_array($v) && $supportArrayValues) { $assoc = ArrayHelper::isAssociative($v); @@ -102,12 +102,12 @@ class Ini extends AbstractRegistryFormat } // Add empty line after section if it is not the last one - if (0 !== --$last) + if (--$last !== 0) { $local[] = ''; } } - elseif (is_array($value) && $supportArrayValues) + elseif (\is_array($value) && $supportArrayValues) { $assoc = ArrayHelper::isAssociative($value); @@ -175,13 +175,14 @@ class Ini extends AbstractRegistryFormat if ($options['processSections']) { - $length = strlen($line); + $length = \strlen($line); // If we are processing sections and the line is a section add the object and continue. if ($line[0] === '[' && ($line[$length - 1] === ']')) { $section = substr($line, 1, $length - 2); $obj->$section = new stdClass; + continue; } } @@ -198,7 +199,7 @@ class Ini extends AbstractRegistryFormat } // Get the key and value for the line. - list ($key, $value) = explode('=', $line, 2); + list($key, $value) = explode('=', $line, 2); // If we have an array item if (substr($key, -1) === ']' && ($openBrace = strpos($key, '[', 1)) !== false) @@ -231,7 +232,7 @@ class Ini extends AbstractRegistryFormat } // If the value is quoted then we assume it is a string. - $length = strlen($value); + $length = \strlen($value); if ($length && ($value[0] === '"') && ($value[$length - 1] === '"')) { @@ -249,18 +250,18 @@ class Ini extends AbstractRegistryFormat $value = false; } elseif ($value === 'true') - // If the value is 'true' assume boolean true. { + // If the value is 'true' assume boolean true. $value = true; } - elseif ($options['parseBooleanWords'] && in_array(strtolower($value), array('yes', 'no'), true)) - // If the value is 'yes' or 'no' and option is enabled assume appropriate boolean + elseif ($options['parseBooleanWords'] && \in_array(strtolower($value), array('yes', 'no'), true)) { + // If the value is 'yes' or 'no' and option is enabled assume appropriate boolean $value = (strtolower($value) === 'yes'); } elseif (is_numeric($value)) - // If the value is numeric than it is either a float or int. { + // If the value is numeric than it is either a float or int. // If there is a period then we assume a float. if (strpos($value, '.') !== false) { @@ -343,20 +344,23 @@ class Ini extends AbstractRegistryFormat { $string = ''; - switch (gettype($value)) + switch (\gettype($value)) { case 'integer': case 'double': $string = $value; + break; case 'boolean': $string = $value ? 'true' : 'false'; + break; case 'string': // Sanitize any CRLF characters.. $string = '"' . str_replace(array("\r\n", "\n"), '\\n', $value) . '"'; + break; } diff --git a/libraries/vendor/joomla/registry/src/Format/Json.php b/libraries/vendor/joomla/registry/src/Format/Json.php index fd46d4f5d79..c1d47fd24e4 100644 --- a/libraries/vendor/joomla/registry/src/Format/Json.php +++ b/libraries/vendor/joomla/registry/src/Format/Json.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/registry/src/Format/Php.php b/libraries/vendor/joomla/registry/src/Format/Php.php index 06e2aded572..9bbf40ca770 100644 --- a/libraries/vendor/joomla/registry/src/Format/Php.php +++ b/libraries/vendor/joomla/registry/src/Format/Php.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -42,7 +42,7 @@ class Php extends AbstractRegistryFormat { $vars .= "\tpublic $" . $k . " = '" . addcslashes($v, '\\\'') . "';\n"; } - elseif (is_array($v) || is_object($v)) + elseif (\is_array($v) || \is_object($v)) { $vars .= "\tpublic $" . $k . ' = ' . $this->getArrayString((array) $v) . ";\n"; } @@ -103,7 +103,7 @@ class Php extends AbstractRegistryFormat $s .= $i ? ', ' : ''; $s .= '"' . $k . '" => '; - if (is_array($v) || is_object($v)) + if (\is_array($v) || \is_object($v)) { $s .= $this->getArrayString((array) $v); } diff --git a/libraries/vendor/joomla/registry/src/Format/Xml.php b/libraries/vendor/joomla/registry/src/Format/Xml.php index c168ff8c034..14c5e745f50 100644 --- a/libraries/vendor/joomla/registry/src/Format/Xml.php +++ b/libraries/vendor/joomla/registry/src/Format/Xml.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -87,23 +87,19 @@ class Xml extends AbstractRegistryFormat $value = (string) $node; return (int) $value; - break; case 'string': return (string) $node; - break; case 'boolean': $value = (string) $node; return (bool) $value; - break; case 'double': $value = (string) $node; return (float) $value; - break; case 'array': $value = array(); @@ -149,13 +145,13 @@ class Xml extends AbstractRegistryFormat { $n = $node->addChild($nodeName, $v); $n->addAttribute('name', $k); - $n->addAttribute('type', gettype($v)); + $n->addAttribute('type', \gettype($v)); } else { $n = $node->addChild($nodeName); $n->addAttribute('name', $k); - $n->addAttribute('type', gettype($v)); + $n->addAttribute('type', \gettype($v)); $this->getXmlChildren($n, $v, $nodeName); } diff --git a/libraries/vendor/joomla/registry/src/Format/Yaml.php b/libraries/vendor/joomla/registry/src/Format/Yaml.php index 86175f8b3c1..03f4cd09d54 100644 --- a/libraries/vendor/joomla/registry/src/Format/Yaml.php +++ b/libraries/vendor/joomla/registry/src/Format/Yaml.php @@ -2,15 +2,15 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ namespace Joomla\Registry\Format; use Joomla\Registry\AbstractRegistryFormat; -use Symfony\Component\Yaml\Parser as SymfonyYamlParser; use Symfony\Component\Yaml\Dumper as SymfonyYamlDumper; +use Symfony\Component\Yaml\Parser as SymfonyYamlParser; /** * YAML format handler for Registry. diff --git a/libraries/vendor/joomla/registry/src/FormatInterface.php b/libraries/vendor/joomla/registry/src/FormatInterface.php index 94a704849b5..4ee534378b8 100644 --- a/libraries/vendor/joomla/registry/src/FormatInterface.php +++ b/libraries/vendor/joomla/registry/src/FormatInterface.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/registry/src/Registry.php b/libraries/vendor/joomla/registry/src/Registry.php index b0bc7004a3b..2b24a4cb281 100644 --- a/libraries/vendor/joomla/registry/src/Registry.php +++ b/libraries/vendor/joomla/registry/src/Registry.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework Registry Package * - * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ @@ -67,11 +67,11 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ { $this->merge($data); } - elseif (is_array($data) || is_object($data)) + elseif (\is_array($data) || \is_object($data)) { $this->bindData($this->data, $data); } - elseif (!empty($data) && is_string($data)) + elseif (!empty($data) && \is_string($data)) { $this->loadString($data); } @@ -106,12 +106,12 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ * * @return integer The custom count as an integer. * - * @link https://secure.php.net/manual/en/countable.count.php + * @link https://www.php.net/manual/en/countable.count.php * @since 1.3.0 */ public function count() { - return count(get_object_vars($this->data)); + return \count(get_object_vars($this->data)); } /** @@ -173,10 +173,11 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ // Traverse the registry to find the correct node for the result. foreach ($nodes as $n) { - if (is_array($node) && isset($node[$n])) + if (\is_array($node) && isset($node[$n])) { $node = $node[$n]; $found = true; + continue; } @@ -225,7 +226,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ // Traverse the registry to find the correct node for the result. foreach ($nodes as $n) { - if (is_array($node) && isset($node[$n])) + if (\is_array($node) && isset($node[$n])) { $node = $node[$n]; $found = true; @@ -510,16 +511,16 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ if (!$nodes) { - return null; + return; } // Initialize the current node to be the registry root. $node = $this->data; // Traverse the registry to find the correct node for the result. - for ($i = 0, $n = count($nodes) - 1; $i < $n; $i++) + for ($i = 0, $n = \count($nodes) - 1; $i < $n; $i++) { - if (is_object($node)) + if (\is_object($node)) { if (!isset($node->{$nodes[$i]}) && ($i !== $n)) { @@ -532,7 +533,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ continue; } - if (is_array($node)) + if (\is_array($node)) { if (($i !== $n) && !isset($node[$nodes[$i]])) { @@ -547,16 +548,19 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ // Get the old value if exists so we can return it switch (true) { - case (is_object($node)): + case \is_object($node): $result = $node->{$nodes[$i]} = $value; + break; - case (is_array($node)): + case \is_array($node): $result = $node[$nodes[$i]] = $value; + break; default: $result = null; + break; } @@ -591,9 +595,9 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ // Traverse the registry to find the correct node for the result. // TODO Create a new private method from part of code below, as it is almost equal to 'set' method - for ($i = 0, $n = count($nodes) - 1; $i <= $n; $i++) + for ($i = 0, $n = \count($nodes) - 1; $i <= $n; $i++) { - if (is_object($node)) + if (\is_object($node)) { if (!isset($node->{$nodes[$i]}) && ($i !== $n)) { @@ -603,7 +607,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ // Pass the child as pointer in case it is an array $node = &$node->{$nodes[$i]}; } - elseif (is_array($node)) + elseif (\is_array($node)) { if (($i !== $n) && !isset($node[$nodes[$i]])) { @@ -615,9 +619,9 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ } } - if (!is_array($node)) - // Convert the node to array to make append possible + if (!\is_array($node)) { + // Convert the node to array to make append possible $node = get_object_vars($node); } @@ -658,7 +662,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ if (!$nodes) { - return null; + return; } // Initialize the current node to be the registry root. @@ -666,9 +670,9 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ $parent = null; // Traverse the registry to find the correct node for the result. - for ($i = 0, $n = count($nodes) - 1; $i < $n; $i++) + for ($i = 0, $n = \count($nodes) - 1; $i < $n; $i++) { - if (is_object($node)) + if (\is_object($node)) { if (!isset($node->{$nodes[$i]}) && ($i !== $n)) { @@ -681,7 +685,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ continue; } - if (is_array($node)) + if (\is_array($node)) { if (($i !== $n) && !isset($node[$nodes[$i]])) { @@ -698,18 +702,21 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ // Get the old value if exists so we can return it switch (true) { - case (is_object($node)): + case \is_object($node): $result = isset($node->{$nodes[$i]}) ? $node->{$nodes[$i]} : null; unset($parent->{$nodes[$i]}); + break; - case (is_array($node)): + case \is_array($node): $result = isset($node[$nodes[$i]]) ? $node[$nodes[$i]] : null; unset($parent[$nodes[$i]]); + break; default: $result = null; + break; } @@ -776,7 +783,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ $this->initialized = true; // Ensure the input data is an array. - $data = is_object($data) ? get_object_vars($data) : (array) $data; + $data = \is_object($data) ? get_object_vars($data) : (array) $data; foreach ($data as $k => $v) { @@ -785,7 +792,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ continue; } - if ($recursive && ((is_array($v) && ArrayHelper::isAssociative($v)) || is_object($v))) + if ($recursive && ((\is_array($v) && ArrayHelper::isAssociative($v)) || \is_object($v))) { if (!isset($parent->$k)) { @@ -814,14 +821,14 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ { $array = array(); - if (is_object($data)) + if (\is_object($data)) { $data = get_object_vars($data); } foreach ($data as $k => $v) { - if (is_object($v) || is_array($v)) + if (\is_object($v) || \is_array($v)) { $array[$k] = $this->asArray($v); @@ -882,7 +889,7 @@ class Registry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \ { $key = $prefix ? $prefix . $separator . $k : $k; - if (is_object($v) || is_array($v)) + if (\is_object($v) || \is_array($v)) { $this->toFlatten($separator, $v, $array, $key); diff --git a/libraries/vendor/joomla/string/src/Inflector.php b/libraries/vendor/joomla/string/src/Inflector.php index 746ad9eac13..4eef7c54c54 100644 --- a/libraries/vendor/joomla/string/src/Inflector.php +++ b/libraries/vendor/joomla/string/src/Inflector.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework String Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/string/src/Normalise.php b/libraries/vendor/joomla/string/src/Normalise.php index 472963749f1..cfd0f6c1d50 100644 --- a/libraries/vendor/joomla/string/src/Normalise.php +++ b/libraries/vendor/joomla/string/src/Normalise.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework String Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/string/src/String.php b/libraries/vendor/joomla/string/src/String.php index 743838cac30..5aa3ab63add 100644 --- a/libraries/vendor/joomla/string/src/String.php +++ b/libraries/vendor/joomla/string/src/String.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework String Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/string/src/StringHelper.php b/libraries/vendor/joomla/string/src/StringHelper.php index 88797342100..85b676c3f5d 100644 --- a/libraries/vendor/joomla/string/src/StringHelper.php +++ b/libraries/vendor/joomla/string/src/StringHelper.php @@ -2,7 +2,7 @@ /** * Part of the Joomla Framework String Package * - * @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved. + * @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ diff --git a/libraries/vendor/joomla/string/src/phputf8/utils/unicode.php b/libraries/vendor/joomla/string/src/phputf8/utils/unicode.php index 2d561f3c2c4..452b186e985 100644 --- a/libraries/vendor/joomla/string/src/phputf8/utils/unicode.php +++ b/libraries/vendor/joomla/string/src/phputf8/utils/unicode.php @@ -24,6 +24,12 @@ * and raises a PHP error at level E_USER_WARNING * Note: this function has been modified slightly in this library to * trigger errors on encountering bad bytes +* +* Joomla modification - As of PHP 7.4, curly brace access has been deprecated. As a result this function has been +* modified to use square brace syntax +* See https://github.com/php/php-src/commit/d574df63dc375f5fc9202ce5afde23f866b6450a +* for additional references +* * @author * @param string UTF-8 encoded string * @return mixed array of unicode code points or FALSE if UTF-8 invalid @@ -43,7 +49,7 @@ function utf8_to_unicode($str) { for($i = 0; $i < $len; $i++) { - $in = ord($str{$i}); + $in = ord($str[$i]); if ( $mState == 0) { diff --git a/libraries/vendor/psr/log/Psr/Log/LoggerInterface.php b/libraries/vendor/psr/log/Psr/Log/LoggerInterface.php index e695046e30f..2206cfde41a 100644 --- a/libraries/vendor/psr/log/Psr/Log/LoggerInterface.php +++ b/libraries/vendor/psr/log/Psr/Log/LoggerInterface.php @@ -22,8 +22,8 @@ interface LoggerInterface /** * System is unusable. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -35,8 +35,8 @@ interface LoggerInterface * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -47,8 +47,8 @@ interface LoggerInterface * * Example: Application component unavailable, unexpected exception. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -58,8 +58,8 @@ interface LoggerInterface * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -71,8 +71,8 @@ interface LoggerInterface * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -81,8 +81,8 @@ interface LoggerInterface /** * Normal but significant events. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -93,8 +93,8 @@ interface LoggerInterface * * Example: User logs in, SQL logs. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -103,8 +103,8 @@ interface LoggerInterface /** * Detailed debug information. * - * @param string $message - * @param array $context + * @param string $message + * @param mixed[] $context * * @return void */ @@ -113,9 +113,9 @@ interface LoggerInterface /** * Logs with an arbitrary level. * - * @param mixed $level - * @param string $message - * @param array $context + * @param mixed $level + * @param string $message + * @param mixed[] $context * * @return void * diff --git a/libraries/vendor/symfony/polyfill-ctype/bootstrap.php b/libraries/vendor/symfony/polyfill-ctype/bootstrap.php index 14d1d0faa37..8d6fc4becca 100644 --- a/libraries/vendor/symfony/polyfill-ctype/bootstrap.php +++ b/libraries/vendor/symfony/polyfill-ctype/bootstrap.php @@ -13,14 +13,34 @@ use Symfony\Polyfill\Ctype as p; if (!function_exists('ctype_alnum')) { function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); } +} +if (!function_exists('ctype_alpha')) { function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); } +} +if (!function_exists('ctype_cntrl')) { function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); } +} +if (!function_exists('ctype_digit')) { function ctype_digit($text) { return p\Ctype::ctype_digit($text); } +} +if (!function_exists('ctype_graph')) { function ctype_graph($text) { return p\Ctype::ctype_graph($text); } +} +if (!function_exists('ctype_lower')) { function ctype_lower($text) { return p\Ctype::ctype_lower($text); } +} +if (!function_exists('ctype_print')) { function ctype_print($text) { return p\Ctype::ctype_print($text); } +} +if (!function_exists('ctype_punct')) { function ctype_punct($text) { return p\Ctype::ctype_punct($text); } +} +if (!function_exists('ctype_space')) { function ctype_space($text) { return p\Ctype::ctype_space($text); } +} +if (!function_exists('ctype_upper')) { function ctype_upper($text) { return p\Ctype::ctype_upper($text); } +} +if (!function_exists('ctype_xdigit')) { function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); } } diff --git a/libraries/vendor/symfony/polyfill-php55/Php55.php b/libraries/vendor/symfony/polyfill-php55/Php55.php index f5cb4834741..46438a10528 100644 --- a/libraries/vendor/symfony/polyfill-php55/Php55.php +++ b/libraries/vendor/symfony/polyfill-php55/Php55.php @@ -43,6 +43,7 @@ final class Php55 // Pre-hash for optimization if password length > hash length $hashLength = \strlen(hash($algorithm, '', true)); switch ($algorithm) { + case 'sha1': case 'sha224': case 'sha256': $blockSize = 64; diff --git a/libraries/vendor/symfony/polyfill-php55/bootstrap.php b/libraries/vendor/symfony/polyfill-php55/bootstrap.php index 5e634feb04a..f6942b83b45 100644 --- a/libraries/vendor/symfony/polyfill-php55/bootstrap.php +++ b/libraries/vendor/symfony/polyfill-php55/bootstrap.php @@ -11,17 +11,19 @@ use Symfony\Polyfill\Php55 as p; -if (PHP_VERSION_ID < 50500) { - if (!function_exists('boolval')) { - function boolval($val) { return p\Php55::boolval($val); } - } - if (!function_exists('json_last_error_msg')) { - function json_last_error_msg() { return p\Php55::json_last_error_msg(); } - } - if (!function_exists('array_column')) { - function array_column($array, $columnKey, $indexKey = null) { return p\Php55ArrayColumn::array_column($array, $columnKey, $indexKey); } - } - if (!function_exists('hash_pbkdf2')) { - function hash_pbkdf2($algorithm, $password, $salt, $iterations, $length = 0, $rawOutput = false) { return p\Php55::hash_pbkdf2($algorithm, $password, $salt, $iterations, $length, $rawOutput); } - } +if (PHP_VERSION_ID >= 50500) { + return; +} + +if (!function_exists('boolval')) { + function boolval($val) { return p\Php55::boolval($val); } +} +if (!function_exists('json_last_error_msg')) { + function json_last_error_msg() { return p\Php55::json_last_error_msg(); } +} +if (!function_exists('array_column')) { + function array_column($array, $columnKey, $indexKey = null) { return p\Php55ArrayColumn::array_column($array, $columnKey, $indexKey); } +} +if (!function_exists('hash_pbkdf2')) { + function hash_pbkdf2($algorithm, $password, $salt, $iterations, $length = 0, $rawOutput = false) { return p\Php55::hash_pbkdf2($algorithm, $password, $salt, $iterations, $length, $rawOutput); } } diff --git a/libraries/vendor/symfony/polyfill-php56/bootstrap.php b/libraries/vendor/symfony/polyfill-php56/bootstrap.php index 587c2a81c52..427dd2e4c8e 100644 --- a/libraries/vendor/symfony/polyfill-php56/bootstrap.php +++ b/libraries/vendor/symfony/polyfill-php56/bootstrap.php @@ -11,28 +11,34 @@ use Symfony\Polyfill\Php56 as p; -if (PHP_VERSION_ID < 50600) { - if (!function_exists('hash_equals')) { - function hash_equals($knownString, $userInput) { return p\Php56::hash_equals($knownString, $userInput); } - } - if (extension_loaded('ldap') && !function_exists('ldap_escape')) { - define('LDAP_ESCAPE_FILTER', 1); - define('LDAP_ESCAPE_DN', 2); +if (PHP_VERSION_ID >= 50600) { + return; +} - function ldap_escape($subject, $ignore = '', $flags = 0) { return p\Php56::ldap_escape($subject, $ignore, $flags); } - } +if (!function_exists('hash_equals')) { + function hash_equals($knownString, $userInput) { return p\Php56::hash_equals($knownString, $userInput); } +} +if (extension_loaded('ldap') && !defined('LDAP_ESCAPE_FILTER')) { + define('LDAP_ESCAPE_FILTER', 1); +} +if (extension_loaded('ldap') && !defined('LDAP_ESCAPE_DN')) { + define('LDAP_ESCAPE_DN', 2); +} - if (50509 === PHP_VERSION_ID && 4 === PHP_INT_SIZE) { - // Missing functions in PHP 5.5.9 - affects 32 bit builds of Ubuntu 14.04LTS - // See https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888 - if (!function_exists('gzopen') && function_exists('gzopen64')) { - function gzopen($filename, $mode, $use_include_path = 0) { return gzopen64($filename, $mode, $use_include_path); } - } - if (!function_exists('gzseek') && function_exists('gzseek64')) { - function gzseek($zp, $offset, $whence = SEEK_SET) { return gzseek64($zp, $offset, $whence); } - } - if (!function_exists('gztell') && function_exists('gztell64')) { - function gztell($zp) { return gztell64($zp); } - } +if (extension_loaded('ldap') && !function_exists('ldap_escape')) { + function ldap_escape($subject, $ignore = '', $flags = 0) { return p\Php56::ldap_escape($subject, $ignore, $flags); } +} + +if (50509 === PHP_VERSION_ID && 4 === PHP_INT_SIZE) { + // Missing functions in PHP 5.5.9 - affects 32 bit builds of Ubuntu 14.04LTS + // See https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888 + if (!function_exists('gzopen') && function_exists('gzopen64')) { + function gzopen($filename, $mode, $use_include_path = 0) { return gzopen64($filename, $mode, $use_include_path); } + } + if (!function_exists('gzseek') && function_exists('gzseek64')) { + function gzseek($zp, $offset, $whence = SEEK_SET) { return gzseek64($zp, $offset, $whence); } + } + if (!function_exists('gztell') && function_exists('gztell64')) { + function gztell($zp) { return gztell64($zp); } } } diff --git a/libraries/vendor/symfony/polyfill-php71/bootstrap.php b/libraries/vendor/symfony/polyfill-php71/bootstrap.php index 01514a59d1b..2037290efcb 100644 --- a/libraries/vendor/symfony/polyfill-php71/bootstrap.php +++ b/libraries/vendor/symfony/polyfill-php71/bootstrap.php @@ -11,8 +11,6 @@ use Symfony\Polyfill\Php71 as p; -if (PHP_VERSION_ID < 70100) { - if (!function_exists('is_iterable')) { - function is_iterable($var) { return p\Php71::is_iterable($var); } - } +if (!function_exists('is_iterable')) { + function is_iterable($var) { return p\Php71::is_iterable($var); } } diff --git a/libraries/vendor/symfony/polyfill-php73/bootstrap.php b/libraries/vendor/symfony/polyfill-php73/bootstrap.php index 4c3f44f6bf8..b3ec352af27 100644 --- a/libraries/vendor/symfony/polyfill-php73/bootstrap.php +++ b/libraries/vendor/symfony/polyfill-php73/bootstrap.php @@ -11,22 +11,21 @@ use Symfony\Polyfill\Php73 as p; -if (PHP_VERSION_ID < 70300) { - if (!function_exists('is_countable')) { - function is_countable($var) { return is_array($var) || $var instanceof Countable || $var instanceof ResourceBundle || $var instanceof SimpleXmlElement; } - } - - if (!function_exists('hrtime')) { - require_once __DIR__.'/Php73.php'; - p\Php73::$startAt = (int) microtime(true); - function hrtime($asNum = false) { return p\Php73::hrtime($asNum); } - } - - if (!function_exists('array_key_first')) { - function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } } - } - - if (!function_exists('array_key_last')) { - function array_key_last(array $array) { end($array); return key($array); } - } +if (PHP_VERSION_ID >= 70300) { + return; +} + +if (!function_exists('is_countable')) { + function is_countable($var) { return is_array($var) || $var instanceof Countable || $var instanceof ResourceBundle || $var instanceof SimpleXmlElement; } +} +if (!function_exists('hrtime')) { + require_once __DIR__.'/Php73.php'; + p\Php73::$startAt = (int) microtime(true); + function hrtime($asNum = false) { return p\Php73::hrtime($asNum); } +} +if (!function_exists('array_key_first')) { + function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } } +} +if (!function_exists('array_key_last')) { + function array_key_last(array $array) { end($array); return key($array); } } diff --git a/libraries/vendor/typo3/phar-stream-wrapper/composer.json b/libraries/vendor/typo3/phar-stream-wrapper/composer.json index e36b09e7a50..755a65f0ba6 100644 --- a/libraries/vendor/typo3/phar-stream-wrapper/composer.json +++ b/libraries/vendor/typo3/phar-stream-wrapper/composer.json @@ -6,9 +6,9 @@ "homepage": "https://typo3.org/", "keywords": ["php", "phar", "stream-wrapper", "security"], "require": { - "php": "^5.3.3|^7.0", + "php": "^5.3.3 || ^7.0", "ext-json": "*", - "brumann/polyfill-unserialize": "^1.0" + "brumann/polyfill-unserialize": "^1.0 || ^2.0" }, "require-dev": { "ext-xdebug": "*", diff --git a/libraries/vendor/typo3/phar-stream-wrapper/src/Helper.php b/libraries/vendor/typo3/phar-stream-wrapper/src/Helper.php index cdba65ca281..72d8444b57c 100644 --- a/libraries/vendor/typo3/phar-stream-wrapper/src/Helper.php +++ b/libraries/vendor/typo3/phar-stream-wrapper/src/Helper.php @@ -31,9 +31,9 @@ class Helper if (function_exists('opcache_reset') && function_exists('opcache_get_status') ) { - $status = opcache_get_status(); + $status = @opcache_get_status(); if (!empty($status['opcache_enabled'])) { - opcache_reset(); + @opcache_reset(); } } } @@ -196,4 +196,4 @@ class Helper { return stripos(PHP_OS, 'WIN') === 0; } -} \ No newline at end of file +}