diff options
48 files changed, 521 insertions, 361 deletions
diff --git a/Zotlabs/Module/Help.php b/Zotlabs/Module/Help.php index cacc81607..fc0ef2708 100644 --- a/Zotlabs/Module/Help.php +++ b/Zotlabs/Module/Help.php @@ -30,7 +30,7 @@ class Help extends \Zotlabs\Web\Controller { $this->determine_help_language(); if (empty($_REQUEST['search']) && argc() === 1) { - goaway("/help/{$this->lang['language']}/about/about"); + goaway("/help/about/about"); killme(); } } @@ -155,7 +155,7 @@ class Help extends \Zotlabs\Web\Controller { } if (empty($args)) { - goaway("/help/{$this->lang['language']}/about/about"); + goaway("/help/about/about"); } // Keep the first remaining arg as the heading slug diff --git a/composer.lock b/composer.lock index f4c1af599..076bf056a 100644 --- a/composer.lock +++ b/composer.lock @@ -1206,20 +1206,20 @@ }, { "name": "ramsey/uuid", - "version": "4.7.5", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" @@ -1282,7 +1282,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.5" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -1294,7 +1294,7 @@ "type": "tidelift" } ], - "time": "2023-11-08T05:53:05+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "sabre/dav", @@ -1567,16 +1567,16 @@ }, { "name": "sabre/vobject", - "version": "4.5.4", + "version": "4.5.5", "source": { "type": "git", "url": "https://github.com/sabre-io/vobject.git", - "reference": "a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772" + "reference": "7148cf57d25aaba0a49f6656d37c35e8175b3087" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/vobject/zipball/a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772", - "reference": "a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772", + "url": "https://api.github.com/repos/sabre-io/vobject/zipball/7148cf57d25aaba0a49f6656d37c35e8175b3087", + "reference": "7148cf57d25aaba0a49f6656d37c35e8175b3087", "shasum": "" }, "require": { @@ -1667,7 +1667,7 @@ "issues": "https://github.com/sabre-io/vobject/issues", "source": "https://github.com/fruux/sabre-vobject" }, - "time": "2023-11-09T12:54:37+00:00" + "time": "2024-07-02T08:48:52+00:00" }, { "name": "sabre/xml", @@ -1740,16 +1740,16 @@ }, { "name": "scssphp/scssphp", - "version": "v1.12.1", + "version": "v1.13.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb" + "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/394ed1e960138710a60d035c1a85d43d0bf0faeb", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/63d1157457e5554edf00b0c1fabab4c1511d2520", + "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520", "shasum": "" }, "require": { @@ -1814,9 +1814,9 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.12.1" + "source": "https://github.com/scssphp/scssphp/tree/v1.13.0" }, - "time": "2024-01-13T12:36:40+00:00" + "time": "2024-08-17T21:02:11+00:00" }, { "name": "simplepie/simplepie", @@ -1906,16 +1906,16 @@ }, { "name": "smarty/smarty", - "version": "v4.4.1", + "version": "v4.5.4", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d" + "reference": "c11676e85aa71bc7c3cd9100f1655a9f4d14616e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/f4152e9b814ae2369b6e4935c05e1e0c3654318d", - "reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/c11676e85aa71bc7c3cd9100f1655a9f4d14616e", + "reference": "c11676e85aa71bc7c3cd9100f1655a9f4d14616e", "shasum": "" }, "require": { @@ -1966,22 +1966,22 @@ "support": { "forum": "https://github.com/smarty-php/smarty/discussions", "issues": "https://github.com/smarty-php/smarty/issues", - "source": "https://github.com/smarty-php/smarty/tree/v4.4.1" + "source": "https://github.com/smarty-php/smarty/tree/v4.5.4" }, - "time": "2024-02-26T13:58:37+00:00" + "time": "2024-08-14T20:04:35+00:00" }, { "name": "spomky-labs/otphp", - "version": "11.2.0", + "version": "11.2.2", "source": { "type": "git", "url": "https://github.com/Spomky-Labs/otphp.git", - "reference": "9a1569038bb1c8e98040b14b8bcbba54f25e7795" + "reference": "b737d1c6330beae7c0bc225d3e848805b352fe42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/9a1569038bb1c8e98040b14b8bcbba54f25e7795", - "reference": "9a1569038bb1c8e98040b14b8bcbba54f25e7795", + "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/b737d1c6330beae7c0bc225d3e848805b352fe42", + "reference": "b737d1c6330beae7c0bc225d3e848805b352fe42", "shasum": "" }, "require": { @@ -1991,17 +1991,17 @@ }, "require-dev": { "ekino/phpstan-banned-code": "^1.0", - "infection/infection": "^0.26", + "infection/infection": "^0.26|^0.27|^0.28", "php-parallel-lint/php-parallel-lint": "^1.3", "phpstan/phpstan": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5.26", + "phpunit/phpunit": "^9.5.26|^10.0|^11.0", "qossmic/deptrac-shim": "^1.0", - "rector/rector": "^0.15", - "symfony/phpunit-bridge": "^6.1", - "symplify/easy-coding-standard": "^11.0" + "rector/rector": "1.0", + "symfony/phpunit-bridge": "^6.1|^7.0", + "symplify/easy-coding-standard": "^12.0" }, "type": "library", "autoload": { @@ -2036,7 +2036,7 @@ ], "support": { "issues": "https://github.com/Spomky-Labs/otphp/issues", - "source": "https://github.com/Spomky-Labs/otphp/tree/11.2.0" + "source": "https://github.com/Spomky-Labs/otphp/tree/11.2.2" }, "funding": [ { @@ -2048,7 +2048,7 @@ "type": "patreon" } ], - "time": "2023-03-16T19:16:25+00:00" + "time": "2024-04-15T07:35:15+00:00" }, { "name": "stephenhill/base58", @@ -2094,20 +2094,20 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -2150,7 +2150,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -2166,7 +2166,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "twbs/bootstrap", diff --git a/doc/de/about/about.bb b/doc/de/about/about.bb index 5e279b5ee..27ea4ca9a 100644 --- a/doc/de/about/about.bb +++ b/doc/de/about/about.bb @@ -1,4 +1,4 @@ -[size=large][b]Was ist $Projectname?[/b][/size] +[h3]Was ist $Projectname?[/h3] $Projectname ist ein dezentralisiertes Kommunikationsnetzwerk mit dem Ziel, Kommunikationsmöglichkeiten bereitzustellen, die Zensur umgehen, die Privatsphäre respektieren und somit frei sind von den Einschränkungen, die die heutigen kommerziellen Kommunikationsgiganten uns auferlegen. Diese stellen in erster Linie Spionagenetzwerke für zahlende Kunden aller Art zur Verfügung und monopolisieren und zentralisieren das ganze Internet – was ursprünglich eben gerade nicht unter den revolutionären Zielen war, die einst zum World Wide Web führten. diff --git a/include/attach.php b/include/attach.php index 449721793..654c9990d 100644 --- a/include/attach.php +++ b/include/attach.php @@ -2599,33 +2599,31 @@ function attach_move($channel_id, $resource_id, $new_folder_hash, $newname = '', intval($r[0]['id']) ); - if($r[0]['is_photo']) { - q("update photo set album = '%s', filename = '%s', os_path = '%s', display_path = '%s' - where resource_id = '%s' and uid = %d", - dbesc($newalbumname), - dbesc($filename), - dbesc($x['os_path']), - dbesc($x['path']), - dbesc($resource_id), - intval($channel_id) - ); - - q("update photo set content = CASE imgscale WHEN 0 THEN %s ELSE CONCAT(%s, '-', imgscale) END where resource_id = '%s' and uid = %d and os_storage = 1", - dbescbin($newstorepath), - dbescbin($newstorepath), - dbesc($resource_id), - intval($channel_id) - ); - - // now rename the thumbnails in os_storage - the original should have been copied before already - $ps = q("SELECT content, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' and imgscale > 0 and os_storage = 1", + if ($r[0]['is_photo']) { + // update the photo DB entries and copy the thumbnails + $ps = q("SELECT imgscale FROM photo WHERE uid = %d AND resource_id = '%s' and os_storage = 1", intval($channel_id), dbesc($resource_id) ); if ($recurse) { foreach($ps as $p) { - rename($oldstorepath . '-' . $p['imgscale'], $p['content']); + q("update photo set album = '%s', filename = '%s', os_path = '%s', display_path = '%s', content = '%s' + where resource_id = '%s' and imgscale = %d and uid = %d", + dbesc($newalbumname), + dbesc($filename), + dbesc($x['os_path']), + dbesc($x['path']), + dbescbin($newstorepath . ((intval($p['imgscale']) > 0) ? '-' . $p['imgscale'] : '')), + dbesc($resource_id), + intval($p['imgscale']), + intval($channel_id) + ); + + // the original should have been copied already + if (intval($p['imgscale']) > 0) { + rename($oldstorepath . '-' . $p['imgscale'], $newstorepath . '-' . $p['imgscale']); + } } } } diff --git a/tests/unit/Module/HelpTest.php b/tests/unit/Module/HelpTest.php index 2c1d31570..1feef26a8 100644 --- a/tests/unit/Module/HelpTest.php +++ b/tests/unit/Module/HelpTest.php @@ -81,8 +81,8 @@ class HelpTest extends \Zotlabs\Tests\Unit\Module\TestCase { $this->get('help'); } - public function test_getting_locale_with_no_topic_should_redirect_to_about_page_for_locale(): void { - $this->expectRedirectTo('help/de/about/about'); + public function test_getting_locale_with_no_topic_should_redirect_to_about_page(): void { + $this->expectRedirectTo('help/about/about'); $this->get('help/de'); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 75e597215..abbf62c86 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1249,21 +1249,21 @@ }, { "name": "ramsey/uuid", - "version": "4.7.5", - "version_normalized": "4.7.5.0", + "version": "4.7.6", + "version_normalized": "4.7.6.0", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" @@ -1300,7 +1300,7 @@ "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, - "time": "2023-11-08T05:53:05+00:00", + "time": "2024-04-27T21:32:50+00:00", "type": "library", "extra": { "captainhook": { @@ -1328,7 +1328,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.5" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -1625,17 +1625,17 @@ }, { "name": "sabre/vobject", - "version": "4.5.4", - "version_normalized": "4.5.4.0", + "version": "4.5.5", + "version_normalized": "4.5.5.0", "source": { "type": "git", "url": "https://github.com/sabre-io/vobject.git", - "reference": "a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772" + "reference": "7148cf57d25aaba0a49f6656d37c35e8175b3087" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sabre-io/vobject/zipball/a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772", - "reference": "a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772", + "url": "https://api.github.com/repos/sabre-io/vobject/zipball/7148cf57d25aaba0a49f6656d37c35e8175b3087", + "reference": "7148cf57d25aaba0a49f6656d37c35e8175b3087", "shasum": "" }, "require": { @@ -1652,7 +1652,7 @@ "suggest": { "hoa/bench": "If you would like to run the benchmark scripts" }, - "time": "2023-11-09T12:54:37+00:00", + "time": "2024-07-02T08:48:52+00:00", "bin": [ "bin/vobject", "bin/generate_vcards" @@ -1804,17 +1804,17 @@ }, { "name": "scssphp/scssphp", - "version": "v1.12.1", - "version_normalized": "1.12.1.0", + "version": "v1.13.0", + "version_normalized": "1.13.0.0", "source": { "type": "git", "url": "https://github.com/scssphp/scssphp.git", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb" + "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scssphp/scssphp/zipball/394ed1e960138710a60d035c1a85d43d0bf0faeb", - "reference": "394ed1e960138710a60d035c1a85d43d0bf0faeb", + "url": "https://api.github.com/repos/scssphp/scssphp/zipball/63d1157457e5554edf00b0c1fabab4c1511d2520", + "reference": "63d1157457e5554edf00b0c1fabab4c1511d2520", "shasum": "" }, "require": { @@ -1837,7 +1837,7 @@ "ext-iconv": "Can be used as fallback when ext-mbstring is not available", "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv" }, - "time": "2024-01-13T12:36:40+00:00", + "time": "2024-08-17T21:02:11+00:00", "bin": [ "bin/pscss" ], @@ -1881,7 +1881,7 @@ ], "support": { "issues": "https://github.com/scssphp/scssphp/issues", - "source": "https://github.com/scssphp/scssphp/tree/v1.12.1" + "source": "https://github.com/scssphp/scssphp/tree/v1.13.0" }, "install-path": "../scssphp/scssphp" }, @@ -1976,17 +1976,17 @@ }, { "name": "smarty/smarty", - "version": "v4.4.1", - "version_normalized": "4.4.1.0", + "version": "v4.5.4", + "version_normalized": "4.5.4.0", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d" + "reference": "c11676e85aa71bc7c3cd9100f1655a9f4d14616e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/f4152e9b814ae2369b6e4935c05e1e0c3654318d", - "reference": "f4152e9b814ae2369b6e4935c05e1e0c3654318d", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/c11676e85aa71bc7c3cd9100f1655a9f4d14616e", + "reference": "c11676e85aa71bc7c3cd9100f1655a9f4d14616e", "shasum": "" }, "require": { @@ -1996,7 +1996,7 @@ "phpunit/phpunit": "^8.5 || ^7.5", "smarty/smarty-lexer": "^3.1" }, - "time": "2024-02-26T13:58:37+00:00", + "time": "2024-08-14T20:04:35+00:00", "type": "library", "extra": { "branch-alias": { @@ -2039,23 +2039,23 @@ "support": { "forum": "https://github.com/smarty-php/smarty/discussions", "issues": "https://github.com/smarty-php/smarty/issues", - "source": "https://github.com/smarty-php/smarty/tree/v4.4.1" + "source": "https://github.com/smarty-php/smarty/tree/v4.5.4" }, "install-path": "../smarty/smarty" }, { "name": "spomky-labs/otphp", - "version": "11.2.0", - "version_normalized": "11.2.0.0", + "version": "11.2.2", + "version_normalized": "11.2.2.0", "source": { "type": "git", "url": "https://github.com/Spomky-Labs/otphp.git", - "reference": "9a1569038bb1c8e98040b14b8bcbba54f25e7795" + "reference": "b737d1c6330beae7c0bc225d3e848805b352fe42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/9a1569038bb1c8e98040b14b8bcbba54f25e7795", - "reference": "9a1569038bb1c8e98040b14b8bcbba54f25e7795", + "url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/b737d1c6330beae7c0bc225d3e848805b352fe42", + "reference": "b737d1c6330beae7c0bc225d3e848805b352fe42", "shasum": "" }, "require": { @@ -2065,19 +2065,19 @@ }, "require-dev": { "ekino/phpstan-banned-code": "^1.0", - "infection/infection": "^0.26", + "infection/infection": "^0.26|^0.27|^0.28", "php-parallel-lint/php-parallel-lint": "^1.3", "phpstan/phpstan": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5.26", + "phpunit/phpunit": "^9.5.26|^10.0|^11.0", "qossmic/deptrac-shim": "^1.0", - "rector/rector": "^0.15", - "symfony/phpunit-bridge": "^6.1", - "symplify/easy-coding-standard": "^11.0" + "rector/rector": "1.0", + "symfony/phpunit-bridge": "^6.1|^7.0", + "symplify/easy-coding-standard": "^12.0" }, - "time": "2023-03-16T19:16:25+00:00", + "time": "2024-04-15T07:35:15+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2112,7 +2112,7 @@ ], "support": { "issues": "https://github.com/Spomky-Labs/otphp/issues", - "source": "https://github.com/Spomky-Labs/otphp/tree/11.2.0" + "source": "https://github.com/Spomky-Labs/otphp/tree/11.2.2" }, "funding": [ { @@ -2173,23 +2173,23 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.29.0", - "version_normalized": "1.29.0.0", + "version": "v1.31.0", + "version_normalized": "1.31.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, - "time": "2024-01-29T20:11:03+00:00", + "time": "2024-09-09T11:45:10+00:00", "type": "library", "extra": { "thanks": { @@ -2232,7 +2232,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 595995bde..7de5f28cd 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'zotlabs/hubzilla', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '39933052a9eb827afee3965509909ba314de5257', + 'reference' => 'becd4c6ffd3138731e528acdf6842fe53f381f6a', 'type' => 'application', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -182,9 +182,9 @@ 'dev_requirement' => false, ), 'ramsey/uuid' => array( - 'pretty_version' => '4.7.5', - 'version' => '4.7.5.0', - 'reference' => '5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e', + 'pretty_version' => '4.7.6', + 'version' => '4.7.6.0', + 'reference' => '91039bc1faa45ba123c4328958e620d382ec7088', 'type' => 'library', 'install_path' => __DIR__ . '/../ramsey/uuid', 'aliases' => array(), @@ -193,7 +193,7 @@ 'rhumsaa/uuid' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => '4.7.5', + 0 => '4.7.6', ), ), 'sabre/dav' => array( @@ -233,9 +233,9 @@ 'dev_requirement' => false, ), 'sabre/vobject' => array( - 'pretty_version' => '4.5.4', - 'version' => '4.5.4.0', - 'reference' => 'a6d53a3e5bec85ed3dd78868b7de0f5b4e12f772', + 'pretty_version' => '4.5.5', + 'version' => '4.5.5.0', + 'reference' => '7148cf57d25aaba0a49f6656d37c35e8175b3087', 'type' => 'library', 'install_path' => __DIR__ . '/../sabre/vobject', 'aliases' => array(), @@ -251,9 +251,9 @@ 'dev_requirement' => false, ), 'scssphp/scssphp' => array( - 'pretty_version' => 'v1.12.1', - 'version' => '1.12.1.0', - 'reference' => '394ed1e960138710a60d035c1a85d43d0bf0faeb', + 'pretty_version' => 'v1.13.0', + 'version' => '1.13.0.0', + 'reference' => '63d1157457e5554edf00b0c1fabab4c1511d2520', 'type' => 'library', 'install_path' => __DIR__ . '/../scssphp/scssphp', 'aliases' => array(), @@ -269,18 +269,18 @@ 'dev_requirement' => false, ), 'smarty/smarty' => array( - 'pretty_version' => 'v4.4.1', - 'version' => '4.4.1.0', - 'reference' => 'f4152e9b814ae2369b6e4935c05e1e0c3654318d', + 'pretty_version' => 'v4.5.4', + 'version' => '4.5.4.0', + 'reference' => 'c11676e85aa71bc7c3cd9100f1655a9f4d14616e', 'type' => 'library', 'install_path' => __DIR__ . '/../smarty/smarty', 'aliases' => array(), 'dev_requirement' => false, ), 'spomky-labs/otphp' => array( - 'pretty_version' => '11.2.0', - 'version' => '11.2.0.0', - 'reference' => '9a1569038bb1c8e98040b14b8bcbba54f25e7795', + 'pretty_version' => '11.2.2', + 'version' => '11.2.2.0', + 'reference' => 'b737d1c6330beae7c0bc225d3e848805b352fe42', 'type' => 'library', 'install_path' => __DIR__ . '/../spomky-labs/otphp', 'aliases' => array(), @@ -296,9 +296,9 @@ 'dev_requirement' => false, ), 'symfony/polyfill-php81' => array( - 'pretty_version' => 'v1.29.0', - 'version' => '1.29.0.0', - 'reference' => 'c565ad1e63f30e7477fc40738343c62b40bc672d', + 'pretty_version' => 'v1.31.0', + 'version' => '1.31.0.0', + 'reference' => '4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), @@ -349,7 +349,7 @@ 'zotlabs/hubzilla' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '39933052a9eb827afee3965509909ba314de5257', + 'reference' => 'becd4c6ffd3138731e528acdf6842fe53f381f6a', 'type' => 'application', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/ramsey/uuid/composer.json b/vendor/ramsey/uuid/composer.json index 9ea4e06b3..8139b54e3 100644 --- a/vendor/ramsey/uuid/composer.json +++ b/vendor/ramsey/uuid/composer.json @@ -11,7 +11,7 @@ "require": { "php": "^8.0", "ext-json": "*", - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ramsey/collection": "^1.2 || ^2.0" }, "require-dev": { diff --git a/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php b/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php index f2d86788c..f065acd46 100644 --- a/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php +++ b/vendor/ramsey/uuid/src/Math/BrickMathCalculator.php @@ -136,9 +136,11 @@ final class BrickMathCalculator implements CalculatorInterface /** * Maps ramsey/uuid rounding modes to those used by brick/math + * + * @return BrickMathRounding::* */ - private function getBrickRoundingMode(int $roundingMode): int + private function getBrickRoundingMode(int $roundingMode) { - return self::ROUNDING_MODE_MAP[$roundingMode] ?? 0; + return self::ROUNDING_MODE_MAP[$roundingMode] ?? BrickMathRounding::UNNECESSARY; } } diff --git a/vendor/sabre/vobject/lib/Document.php b/vendor/sabre/vobject/lib/Document.php index 14a77c911..6b908c70e 100644 --- a/vendor/sabre/vobject/lib/Document.php +++ b/vendor/sabre/vobject/lib/Document.php @@ -186,10 +186,8 @@ abstract class Document extends Component * @param mixed $value * @param array $parameters * @param string $valueType Force a specific valuetype, such as URI or TEXT - * - * @return Property */ - public function createProperty($name, $value = null, array $parameters = null, $valueType = null) + public function createProperty($name, $value = null, array $parameters = null, $valueType = null, int $lineIndex = null, string $lineString = null): Property { // If there's a . in the name, it means it's prefixed by a groupname. if (false !== ($i = strpos($name, '.'))) { @@ -223,7 +221,7 @@ abstract class Document extends Component $parameters = []; } - return new $class($this, $name, $value, $parameters, $group); + return new $class($this, $name, $value, $parameters, $group, $lineIndex, $lineString); } /** diff --git a/vendor/sabre/vobject/lib/ITip/Broker.php b/vendor/sabre/vobject/lib/ITip/Broker.php index 80d9a5b31..dbdd80b78 100644 --- a/vendor/sabre/vobject/lib/ITip/Broker.php +++ b/vendor/sabre/vobject/lib/ITip/Broker.php @@ -338,7 +338,10 @@ class Broker // Finding all the instances the attendee replied to. foreach ($itipMessage->message->VEVENT as $vevent) { - $recurId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->getValue() : 'master'; + // Use the Unix timestamp returned by getTimestamp as a unique identifier for the recurrence. + // The Unix timestamp will be the same for an event, even if the reply from the attendee + // used a different format/timezone to express the event date-time. + $recurId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->getDateTime()->getTimestamp() : 'master'; $attendee = $vevent->ATTENDEE; $instances[$recurId] = $attendee['PARTSTAT']->getValue(); if (isset($vevent->{'REQUEST-STATUS'})) { @@ -351,7 +354,8 @@ class Broker // all the instances where we have a reply for. $masterObject = null; foreach ($existingObject->VEVENT as $vevent) { - $recurId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->getValue() : 'master'; + // Use the Unix timestamp returned by getTimestamp as a unique identifier for the recurrence. + $recurId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->getDateTime()->getTimestamp() : 'master'; if ('master' === $recurId) { $masterObject = $vevent; } @@ -398,7 +402,10 @@ class Broker $newObject = $recurrenceIterator->getEventObject(); $recurrenceIterator->next(); - if (isset($newObject->{'RECURRENCE-ID'}) && $newObject->{'RECURRENCE-ID'}->getValue() === $recurId) { + // Compare the Unix timestamp returned by getTimestamp with the previously calculated timestamp. + // If they are the same, then this is a matching recurrence, even though its date-time may have + // been expressed in a different format/timezone. + if (isset($newObject->{'RECURRENCE-ID'}) && $newObject->{'RECURRENCE-ID'}->getDateTime()->getTimestamp() === $recurId) { $found = true; } --$iterations; diff --git a/vendor/sabre/vobject/lib/Parser/MimeDir.php b/vendor/sabre/vobject/lib/Parser/MimeDir.php index 513f7bd0c..d484d6a39 100644 --- a/vendor/sabre/vobject/lib/Parser/MimeDir.php +++ b/vendor/sabre/vobject/lib/Parser/MimeDir.php @@ -83,6 +83,12 @@ class MimeDir extends Parser $this->setInput($input); } + if (!\is_resource($this->input)) { + // Null was passed as input, but there was no existing input buffer + // There is nothing to parse. + throw new ParseException('No input provided to parse'); + } + if (0 !== $options) { $this->options = $options; } @@ -447,7 +453,7 @@ class MimeDir extends Parser } } - $propObj = $this->root->createProperty($property['name'], null, $namedParameters); + $propObj = $this->root->createProperty($property['name'], null, $namedParameters, null, $this->startLine, $line); foreach ($namelessParameters as $namelessParameter) { $propObj->add(null, $namelessParameter); diff --git a/vendor/sabre/vobject/lib/Property.php b/vendor/sabre/vobject/lib/Property.php index f6550246a..0805c139a 100644 --- a/vendor/sabre/vobject/lib/Property.php +++ b/vendor/sabre/vobject/lib/Property.php @@ -57,6 +57,20 @@ abstract class Property extends Node public $delimiter = ';'; /** + * The line number in the original iCalendar / vCard file + * that corresponds with the current node + * if the node was read from a file. + */ + public $lineIndex; + + /** + * The line string from the original iCalendar / vCard file + * that corresponds with the current node + * if the node was read from a file. + */ + public $lineString; + + /** * Creates the generic property. * * Parameters must be specified in key=>value syntax. @@ -67,7 +81,7 @@ abstract class Property extends Node * @param array $parameters List of parameters * @param string $group The vcard property group */ - public function __construct(Component $root, $name, $value = null, array $parameters = [], $group = null) + public function __construct(Component $root, $name, $value = null, array $parameters = [], $group = null, int $lineIndex = null, string $lineString = null) { $this->name = $name; $this->group = $group; @@ -81,6 +95,14 @@ abstract class Property extends Node if (!is_null($value)) { $this->setValue($value); } + + if (!is_null($lineIndex)) { + $this->lineIndex = $lineIndex; + } + + if (!is_null($lineString)) { + $this->lineString = $lineString; + } } /** diff --git a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php index 4f0e9070d..ca53b63ee 100644 --- a/vendor/sabre/vobject/lib/Recur/RRuleIterator.php +++ b/vendor/sabre/vobject/lib/Recur/RRuleIterator.php @@ -173,6 +173,14 @@ class RRuleIterator implements Iterator protected $currentDate; /** + * The number of hours that the next occurrence of an event + * jumped forward, usually because summer time started and + * the requested time-of-day like 0230 did not exist on that + * day. And so the event was scheduled 1 hour later at 0330. + */ + protected $hourJump = 0; + + /** * Frequency is one of: secondly, minutely, hourly, daily, weekly, monthly, * yearly. * @@ -320,11 +328,64 @@ class RRuleIterator implements Iterator /* Functions that advance the iterator {{{ */ /** + * Gets the original start time of the RRULE. + * + * The value is formatted as a string with 24-hour:minute:second + */ + protected function startTime(): string + { + return $this->startDate->format('H:i:s'); + } + + /** + * Advances currentDate by the interval. + * The time is set from the original startDate. + * If the recurrence is on a day when summer time started, then the + * time on that day may have jumped forward, for example, from 0230 to 0330. + * Using the original time means that the next recurrence will be calculated + * based on the original start time and the day/week/month/year interval. + * So the start time of the next occurrence can correctly revert to 0230. + */ + protected function advanceTheDate(string $interval): void + { + $this->currentDate = $this->currentDate->modify($interval.' '.$this->startTime()); + } + + /** + * Does the processing for adjusting the time of multi-hourly events when summer time starts. + */ + protected function adjustForTimeJumpsOfHourlyEvent(DateTimeInterface $previousEventDateTime): void + { + if (0 === $this->hourJump) { + // Remember if the clock time jumped forward on the next occurrence. + // That happens if the next event time is on a day when summer time starts + // and the event time is in the non-existent hour of the day. + // For example, an event that normally starts at 02:30 will + // have to start at 03:30 on that day. + // If the interval is just 1 hour, then there is no "jumping back" to do. + // The events that day will happen, for example, at 0030 0130 0330 0430 0530... + if ($this->interval > 1) { + $expectedHourOfNextDate = ((int) $previousEventDateTime->format('G') + $this->interval) % 24; + $actualHourOfNextDate = (int) $this->currentDate->format('G'); + $this->hourJump = $actualHourOfNextDate - $expectedHourOfNextDate; + } + } else { + // The hour "jumped" for the previous occurrence, to avoid the non-existent time. + // currentDate got set ahead by (usually) 1 hour on that day. + // Adjust it back for this next occurrence. + $this->currentDate = $this->currentDate->sub(new \DateInterval('PT'.$this->hourJump.'H')); + $this->hourJump = 0; + } + } + + /** * Does the processing for advancing the iterator for hourly frequency. */ protected function nextHourly() { + $previousEventDateTime = clone $this->currentDate; $this->currentDate = $this->currentDate->modify('+'.$this->interval.' hours'); + $this->adjustForTimeJumpsOfHourlyEvent($previousEventDateTime); } /** @@ -333,7 +394,7 @@ class RRuleIterator implements Iterator protected function nextDaily() { if (!$this->byHour && !$this->byDay) { - $this->currentDate = $this->currentDate->modify('+'.$this->interval.' days'); + $this->advanceTheDate('+'.$this->interval.' days'); return; } @@ -392,7 +453,7 @@ class RRuleIterator implements Iterator protected function nextWeekly() { if (!$this->byHour && !$this->byDay) { - $this->currentDate = $this->currentDate->modify('+'.$this->interval.' weeks'); + $this->advanceTheDate('+'.$this->interval.' weeks'); return; } @@ -414,7 +475,7 @@ class RRuleIterator implements Iterator if ($this->byHour) { $this->currentDate = $this->currentDate->modify('+1 hours'); } else { - $this->currentDate = $this->currentDate->modify('+1 days'); + $this->advanceTheDate('+1 days'); } // Current day of the week @@ -449,13 +510,13 @@ class RRuleIterator implements Iterator // occur to the next month. We Must skip these invalid // entries. if ($currentDayOfMonth < 29) { - $this->currentDate = $this->currentDate->modify('+'.$this->interval.' months'); + $this->advanceTheDate('+'.$this->interval.' months'); } else { $increase = 0; do { ++$increase; $tempDate = clone $this->currentDate; - $tempDate = $tempDate->modify('+ '.($this->interval * $increase).' months'); + $tempDate = $tempDate->modify('+ '.($this->interval * $increase).' months '.$this->startTime()); } while ($tempDate->format('j') != $currentDayOfMonth); $this->currentDate = $tempDate; } @@ -506,11 +567,15 @@ class RRuleIterator implements Iterator } } + // Set the currentDate to the year and month that we are in, and the day of the month that we have selected. + // That day could be a day when summer time starts, and if the time of the event is, for example, 0230, + // then 0230 will not be a valid time on that day. So always apply the start time from the original startDate. + // The "modify" method will set the time forward to 0330, for example, if needed. $this->currentDate = $this->currentDate->setDate( (int) $this->currentDate->format('Y'), (int) $this->currentDate->format('n'), (int) $occurrence - ); + )->modify($this->startTime()); } /** @@ -627,7 +692,7 @@ class RRuleIterator implements Iterator } // The easiest form - $this->currentDate = $this->currentDate->modify('+'.$this->interval.' years'); + $this->advanceTheDate('+'.$this->interval.' years'); return; } @@ -651,7 +716,11 @@ class RRuleIterator implements Iterator // If we advanced to the next month or year, the first // occurrence is always correct. if ($occurrence > $currentDayOfMonth || $advancedToNewMonth) { - break 2; + // only consider byMonth matches, + // otherwise, we don't follow RRule correctly + if (in_array($currentMonth, $this->byMonth)) { + break 2; + } } } @@ -687,7 +756,7 @@ class RRuleIterator implements Iterator (int) $currentYear, (int) $currentMonth, (int) $occurrence - ); + )->modify($this->startTime()); return; } else { @@ -704,7 +773,7 @@ class RRuleIterator implements Iterator (int) $currentYear, (int) $currentMonth, (int) $currentDayOfMonth - ); + )->modify($this->startTime()); return; } diff --git a/vendor/sabre/vobject/lib/Version.php b/vendor/sabre/vobject/lib/Version.php index c7ca69e14..309b995cf 100644 --- a/vendor/sabre/vobject/lib/Version.php +++ b/vendor/sabre/vobject/lib/Version.php @@ -14,5 +14,5 @@ class Version /** * Full version number. */ - public const VERSION = '4.5.4'; + public const VERSION = '4.5.5'; } diff --git a/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php b/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php index b1d3d1a81..22b346e9b 100644 --- a/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php +++ b/vendor/scssphp/scssphp/src/Block/DirectiveBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -26,7 +27,7 @@ class DirectiveBlock extends Block public $name; /** - * @var string|array|null + * @var array|Number|null */ public $value; diff --git a/vendor/scssphp/scssphp/src/Block/EachBlock.php b/vendor/scssphp/scssphp/src/Block/EachBlock.php index b3289579d..1217994ea 100644 --- a/vendor/scssphp/scssphp/src/Block/EachBlock.php +++ b/vendor/scssphp/scssphp/src/Block/EachBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -26,7 +27,7 @@ class EachBlock extends Block public $vars = []; /** - * @var array + * @var array|Number */ public $list; diff --git a/vendor/scssphp/scssphp/src/Block/ElseifBlock.php b/vendor/scssphp/scssphp/src/Block/ElseifBlock.php index 4622bca79..f732c2d70 100644 --- a/vendor/scssphp/scssphp/src/Block/ElseifBlock.php +++ b/vendor/scssphp/scssphp/src/Block/ElseifBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type; class ElseifBlock extends Block { /** - * @var array + * @var array|Number */ public $cond; diff --git a/vendor/scssphp/scssphp/src/Block/ForBlock.php b/vendor/scssphp/scssphp/src/Block/ForBlock.php index a9cf6733b..962944111 100644 --- a/vendor/scssphp/scssphp/src/Block/ForBlock.php +++ b/vendor/scssphp/scssphp/src/Block/ForBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -26,12 +27,12 @@ class ForBlock extends Block public $var; /** - * @var array + * @var array|Number */ public $start; /** - * @var array + * @var array|Number */ public $end; diff --git a/vendor/scssphp/scssphp/src/Block/IfBlock.php b/vendor/scssphp/scssphp/src/Block/IfBlock.php index 9f21bf88a..659c7c274 100644 --- a/vendor/scssphp/scssphp/src/Block/IfBlock.php +++ b/vendor/scssphp/scssphp/src/Block/IfBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type; class IfBlock extends Block { /** - * @var array + * @var array|Number */ public $cond; diff --git a/vendor/scssphp/scssphp/src/Block/MediaBlock.php b/vendor/scssphp/scssphp/src/Block/MediaBlock.php index c49ee1b2b..ab975c74e 100644 --- a/vendor/scssphp/scssphp/src/Block/MediaBlock.php +++ b/vendor/scssphp/scssphp/src/Block/MediaBlock.php @@ -13,6 +13,7 @@ namespace ScssPhp\ScssPhp\Block; use ScssPhp\ScssPhp\Block; +use ScssPhp\ScssPhp\Node\Number; use ScssPhp\ScssPhp\Type; /** @@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type; class MediaBlock extends Block { /** - * @var string|array|null + * @var string|array|Number|null */ public $value; diff --git a/vendor/scssphp/scssphp/src/Compiler.php b/vendor/scssphp/scssphp/src/Compiler.php index d4e7c6896..d654ee6eb 100644 --- a/vendor/scssphp/scssphp/src/Compiler.php +++ b/vendor/scssphp/scssphp/src/Compiler.php @@ -140,13 +140,28 @@ class Compiler /** @deprecated */ public static $Infinity = [Type::T_KEYWORD, 'Infinity']; public static $null = [Type::T_NULL]; + /** + * @internal + */ public static $nullString = [Type::T_STRING, '', []]; + /** + * @internal + */ public static $defaultValue = [Type::T_KEYWORD, '']; + /** + * @internal + */ public static $selfSelector = [Type::T_SELF]; public static $emptyList = [Type::T_LIST, '', []]; public static $emptyMap = [Type::T_MAP, [], []]; public static $emptyString = [Type::T_STRING, '"', []]; + /** + * @internal + */ public static $with = [Type::T_KEYWORD, 'with']; + /** + * @internal + */ public static $without = [Type::T_KEYWORD, 'without']; private static $emptyArgumentList = [Type::T_LIST, '', [], []]; @@ -1656,6 +1671,7 @@ class Compiler $parser = $this->parserFactory(__METHOD__); if ($parser->parseValue($buffer, $reParsedWith)) { + \assert(\is_array($reParsedWith)); $withCondition = $reParsedWith; } } @@ -5702,10 +5718,36 @@ EOL; @trigger_error('Omitting the argument declaration when registering custom function is deprecated and won\'t be supported in ScssPhp 2.0 anymore.', E_USER_DEPRECATED); } + if ($this->reflectCallable($callback)->getNumberOfRequiredParameters() > 1) { + @trigger_error('The second argument passed to the callback of custom functions is deprecated and won\'t be supported in ScssPhp 2.0 anymore. Register a callback accepting only 1 parameter instead.', E_USER_DEPRECATED); + } + $this->userFunctions[$this->normalizeName($name)] = [$callback, $argumentDeclaration]; } /** + * @return \ReflectionFunctionAbstract + */ + private function reflectCallable(callable $c) + { + if (\is_object($c) && !$c instanceof \Closure) { + $c = [$c, '__invoke']; + } + + if (\is_string($c) && false !== strpos($c, '::')) { + $c = explode('::', $c, 2); + } + + if (\is_array($c)) { + return new \ReflectionMethod($c[0], $c[1]); + } + + \assert(\is_string($c) || $c instanceof \Closure); + + return new \ReflectionFunction($c); + } + + /** * Unregister function * * @api diff --git a/vendor/scssphp/scssphp/src/Parser.php b/vendor/scssphp/scssphp/src/Parser.php index 2666a263c..e7cb2e8c1 100644 --- a/vendor/scssphp/scssphp/src/Parser.php +++ b/vendor/scssphp/scssphp/src/Parser.php @@ -310,8 +310,9 @@ class Parser * * @api * - * @param string $buffer - * @param string|array $out + * @param string $buffer + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -345,9 +346,9 @@ class Parser * * @api * - * @param string $buffer - * @param string|array $out - * @param bool $shouldValidate + * @param string $buffer + * @param array $out + * @param bool $shouldValidate * * @return bool */ @@ -1255,10 +1256,10 @@ class Parser /** * Assert a parsed part is plain CSS Valid * - * @param array|false $parsed + * @param array|Number|false $parsed * @param int $startPos * - * @return array + * @return array|Number * * @throws ParserException */ @@ -1288,10 +1289,10 @@ class Parser /** * Check a parsed element is plain CSS Valid * - * @param array $parsed + * @param array|Number|string $parsed * @param bool $allowExpression * - * @return array|false + * @return ($parsed is string ? string : ($parsed is Number ? Number : array|false)) */ protected function isPlainCssValidElement($parsed, $allowExpression = false) { @@ -1300,6 +1301,10 @@ class Parser return $parsed; } + if ($parsed instanceof Number) { + return $parsed; + } + if ( \in_array($parsed[0], [Type::T_FUNCTION, Type::T_FUNCTION_CALL]) && !\in_array($parsed[1], [ @@ -2094,8 +2099,9 @@ class Parser /** * Parse directive value list that considers $vars as keyword * - * @param array $out + * @param mixed $out * @param string|false $endChar + * @param-out array|Number $out * * @return bool * @@ -2158,7 +2164,8 @@ class Parser /** * Parse comma separated value list * - * @param array $out + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -2176,10 +2183,11 @@ class Parser * Parse a function call, where externals () are part of the call * and not of the value list * - * @param array $out + * @param mixed $out * @param bool $mandatoryEnclos * @param null|string $charAfter * @param null|bool $eatWhiteSp + * @param-out array|Number $out * * @return bool */ @@ -2215,7 +2223,8 @@ class Parser /** * Parse space separated value list * - * @param array $out + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -2227,10 +2236,11 @@ class Parser /** * Parse generic list * - * @param array $out + * @param mixed $out * @param string $parseItem The name of the method used to parse items * @param string $delim * @param bool $flatten + * @param-out ($flatten is false ? array : array|Number) $out * * @return bool */ @@ -2334,9 +2344,10 @@ class Parser /** * Parse expression * - * @param array $out + * @param mixed $out * @param bool $listOnly * @param bool $lookForExp + * @param-out array|Number $out * * @return bool * @@ -2401,10 +2412,11 @@ class Parser /** * Parse expression specifically checking for lists in parenthesis or brackets * - * @param array $out + * @param mixed $out * @param int $s * @param string $closingParen * @param string[] $allowedTypes + * @param-out array|Number $out * * @return bool * @@ -2463,10 +2475,10 @@ class Parser /** * Parse left-hand side of subexpression * - * @param array $lhs - * @param int $minP + * @param array|Number $lhs + * @param int $minP * - * @return array + * @return array|Number */ protected function expHelper($lhs, $minP) { @@ -2517,7 +2529,8 @@ class Parser /** * Parse value * - * @param array $out + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -2725,7 +2738,8 @@ class Parser /** * Parse parenthesized value * - * @param array $out + * @param mixed $out + * @param-out array|Number $out * * @return bool */ @@ -2797,7 +2811,8 @@ class Parser * Parse function call * * @param string $name - * @param array $func + * @param mixed $func + * @param-out array $func * * @return bool */ @@ -2900,7 +2915,8 @@ class Parser /** * Parse mixin/function definition argument list * - * @param array $out + * @param mixed $out + * @param-out list<array{string, array|Number|null, bool}> $out * * @return bool */ @@ -2962,7 +2978,8 @@ class Parser /** * Parse map * - * @param array $out + * @param mixed $out + * @param-out array $out * * @return bool */ @@ -3004,7 +3021,8 @@ class Parser /** * Parse color * - * @param array $out + * @param mixed $out + * @param-out array $out * * @return bool */ @@ -3030,7 +3048,8 @@ class Parser /** * Parse number with unit * - * @param array $unit + * @param mixed $unit + * @param-out Number $unit * * @return bool */ @@ -3236,11 +3255,12 @@ class Parser * Parse an unbounded string stopped by $end * * @param string $end - * @param array $out + * @param mixed $out * @param string $nestOpen * @param string $nestClose * @param bool $rtrim * @param string $disallow + * @param-out array $out * * @return bool */ @@ -3317,8 +3337,9 @@ class Parser /** * Parser interpolation * - * @param string|array $out - * @param bool $lookWhite save information about whitespace before and after + * @param mixed $out + * @param bool $lookWhite save information about whitespace before and after + * @param-out array $out * * @return bool */ @@ -3852,7 +3873,8 @@ class Parser /** * Parse a variable * - * @param array $out + * @param mixed $out + * @param-out array{Type::*, string} $out * * @return bool */ @@ -3881,9 +3903,10 @@ class Parser /** * Parse a keyword * - * @param string $word - * @param bool $eatWhitespace - * @param bool $inSelector + * @param mixed $word + * @param bool $eatWhitespace + * @param bool $inSelector + * @param-out string $word * * @return bool */ @@ -3999,7 +4022,8 @@ class Parser /** * Parse a url * - * @param array $out + * @param mixed $out + * @param-out array $out * * @return bool */ @@ -4009,10 +4033,10 @@ class Parser $s = $this->count; if ( - ($this->string($out) || $this->spaceList($out)) && + ($this->string($inner) || $this->spaceList($inner)) && $this->matchChar(')') ) { - $out = [Type::T_STRING, '', ['url(', $out, ')']]; + $out = [Type::T_STRING, '', ['url(', $inner, ')']]; return true; } @@ -4055,7 +4079,7 @@ class Parser /** * Strip assignment flag from the list * - * @param array $value + * @param array|Number $value * * @return string[] */ diff --git a/vendor/scssphp/scssphp/src/Type.php b/vendor/scssphp/scssphp/src/Type.php index d43088785..2f8ab6506 100644 --- a/vendor/scssphp/scssphp/src/Type.php +++ b/vendor/scssphp/scssphp/src/Type.php @@ -95,6 +95,9 @@ class Type * @internal */ const T_FOR = 'for'; + /** + * @internal + */ const T_FUNCTION = 'function'; /** * @internal diff --git a/vendor/scssphp/scssphp/src/Version.php b/vendor/scssphp/scssphp/src/Version.php index 89bd59526..45fc9835c 100644 --- a/vendor/scssphp/scssphp/src/Version.php +++ b/vendor/scssphp/scssphp/src/Version.php @@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp; */ class Version { - const VERSION = '1.12.1'; + const VERSION = '1.13.0'; } diff --git a/vendor/smarty/smarty/CHANGELOG.md b/vendor/smarty/smarty/CHANGELOG.md index 69d41e7aa..bff690d84 100644 --- a/vendor/smarty/smarty/CHANGELOG.md +++ b/vendor/smarty/smarty/CHANGELOG.md @@ -6,11 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.5.4] - 2024-08-14 +- Fixed that using `count()` would trigger a deprecation notice. [#813](https://github.com/smarty-php/smarty/issues/813) + + +## [4.5.3] - 2024-05-28 +- Fixed a code injection vulnerability in extends-tag. This addresses CVE-2024-35226. + + +## [4.5.2] - 2024-04-06 +- Fixed argument must be passed by reference error introduced in v4.5.1 [#964](https://github.com/smarty-php/smarty/issues/964) + +## [4.5.1] - 2024-03-18 +- Using unregistered static class methods in expressions now also triggers a deprecation notice because we will drop support for this in the next major release [#813](https://github.com/smarty-php/smarty/issues/813) + +## [4.5.0] - 2024-03-18 +- (this release accidentally didn't contain any changes, fixed in 4.5.1) + ## [4.4.1] - 2024-02-26 - Fixed internal release-tooling ## [4.4.0] - 2024-02-26 -### Changed - Using the `|implode`, `|json_encode` and `|substr` modifiers does not generate a deprecation warning anymore as they will continue to be supported in v5 [#939](https://github.com/smarty-php/smarty/issues/939) ### Added diff --git a/vendor/smarty/smarty/docs/designers/language-builtin-functions/language-function-section.md b/vendor/smarty/smarty/docs/designers/language-builtin-functions/language-function-section.md index ba17224c0..427902512 100644 --- a/vendor/smarty/smarty/docs/designers/language-builtin-functions/language-function-section.md +++ b/vendor/smarty/smarty/docs/designers/language-builtin-functions/language-function-section.md @@ -178,14 +178,14 @@ The above example will output: </p> <p> name: Jack Jones<br /> - home phone: 777-555-5555<br /> - cell phone: 888-555-5555<br /> + home: 777-555-5555<br /> + cell: 888-555-5555<br /> e-mail: jack@myexample.com </p> <p> name: Jane Munson<br /> - home phone: 000-555-5555<br /> - cell phone: 123456<br /> + home: 000-555-5555<br /> + cell: 123456<br /> e-mail: jane@myexample.com </p> ``` diff --git a/vendor/smarty/smarty/lexer/smarty_internal_templateparser.y b/vendor/smarty/smarty/lexer/smarty_internal_templateparser.y index 620498765..ffc85bc06 100644 --- a/vendor/smarty/smarty/lexer/smarty_internal_templateparser.y +++ b/vendor/smarty/smarty/lexer/smarty_internal_templateparser.y @@ -785,6 +785,9 @@ value(res) ::= ns1(c)DOUBLECOLON static_class_access(s). { if (isset($this->smarty->registered_classes[c])) { res = $this->smarty->registered_classes[c].'::'.s[0].s[1]; } else { + trigger_error('Using unregistered static method "' . c.'::'.s[0] . '" in a template is deprecated and will be ' . + 'removed in a future release. Use Smarty::registerClass to explicitly register ' . + 'a class for access.', E_USER_DEPRECATED); res = c.'::'.s[0].s[1]; } } else { diff --git a/vendor/smarty/smarty/libs/Smarty.class.php b/vendor/smarty/smarty/libs/Smarty.class.php index 0a47c8350..97706e2aa 100644 --- a/vendor/smarty/smarty/libs/Smarty.class.php +++ b/vendor/smarty/smarty/libs/Smarty.class.php @@ -107,7 +107,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '4.4.1'; + const SMARTY_VERSION = '4.5.4'; /** * define variable scopes */ diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php index d72d2b76f..69a7b5521 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_extends.php @@ -30,7 +30,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh * * @var array */ - public $optional_attributes = array('extends_resource'); + public $optional_attributes = array(); /** * Attribute definition: Overwrites base class. @@ -62,29 +62,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh } // add code to initialize inheritance $this->registerInit($compiler, true); - $file = trim($_attr[ 'file' ], '\'"'); - if (strlen($file) > 8 && substr($file, 0, 8) === 'extends:') { - // generate code for each template - $files = array_reverse(explode('|', substr($file, 8))); - $i = 0; - foreach ($files as $file) { - if ($file[ 0 ] === '"') { - $file = trim($file, '".'); - } else { - $file = "'{$file}'"; - } - $i++; - if ($i === count($files) && isset($_attr[ 'extends_resource' ])) { - $this->compileEndChild($compiler); - } - $this->compileInclude($compiler, $file); - } - if (!isset($_attr[ 'extends_resource' ])) { - $this->compileEndChild($compiler); - } - } else { - $this->compileEndChild($compiler, $_attr[ 'file' ]); - } + $this->compileEndChild($compiler, $_attr[ 'file' ]); $compiler->has_code = false; return ''; } @@ -115,44 +93,4 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh '') . ");\n?>" ); } - - /** - * Add code for including subtemplate to end of template - * - * @param \Smarty_Internal_TemplateCompilerBase $compiler - * @param string $template subtemplate name - * - * @throws \SmartyCompilerException - * @throws \SmartyException - */ - private function compileInclude(Smarty_Internal_TemplateCompilerBase $compiler, $template) - { - $compiler->parser->template_postfix[] = new Smarty_Internal_ParseTree_Tag( - $compiler->parser, - $compiler->compileTag( - 'include', - array( - $template, - array('scope' => 'parent') - ) - ) - ); - } - - /** - * Create source code for {extends} from source components array - * - * @param \Smarty_Internal_Template $template - * - * @return string - */ - public static function extendsSourceArrayCode(Smarty_Internal_Template $template) - { - $resources = array(); - foreach ($template->source->components as $source) { - $resources[] = $source->resource; - } - return $template->smarty->left_delimiter . 'extends file=\'extends:' . join('|', $resources) . - '\' extends_resource=true' . $template->smarty->right_delimiter; - } } diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php index aea082f01..31fd6e1da 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php @@ -109,9 +109,11 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedPhpModifier($modifier, $compiler) ) { - trigger_error('Using php-function "' . $modifier . '" as a modifier is deprecated and will be ' . - 'removed in a future release. Use Smarty::registerPlugin to explicitly register ' . - 'a custom modifier.', E_USER_DEPRECATED); + if (!in_array($modifier, ['time', 'join', 'is_array', 'in_array'])) { + trigger_error('Using unregistered function "' . $modifier . '" in a template is deprecated and will be ' . + 'removed in a future release. Use Smarty::registerPlugin to explicitly register ' . + 'a custom modifier.', E_USER_DEPRECATED); + } $output = "{$modifier}({$params})"; } $compiler->known_modifier_type[ $modifier ] = $type; diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php index d5c18d31a..03797f7f8 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -455,15 +455,29 @@ abstract class Smarty_Internal_TemplateCompilerBase $this->smarty->_current_file = $this->template->source->filepath; // get template source if (!empty($this->template->source->components)) { - // we have array of inheritance templates by extends: resource - // generate corresponding source code sequence - $_content = - Smarty_Internal_Compile_Extends::extendsSourceArrayCode($this->template); + $_compiled_code = '<?php $_smarty_tpl->_loadInheritance(); $_smarty_tpl->inheritance->init($_smarty_tpl, true); ?>'; + + $i = 0; + $reversed_components = array_reverse($this->template->getSource()->components); + foreach ($reversed_components as $source) { + $i++; + if ($i === count($reversed_components)) { + $_compiled_code .= '<?php $_smarty_tpl->inheritance->endChild($_smarty_tpl); ?>'; + } + $_compiled_code .= $this->compileTag( + 'include', + [ + var_export($source->resource, true), + ['scope' => 'parent'], + ] + ); + } + $_compiled_code = $this->postFilter($_compiled_code, $this->template); } else { // get template source $_content = $this->template->source->getContent(); + $_compiled_code = $this->postFilter($this->doCompile($this->preFilter($_content), true)); } - $_compiled_code = $this->postFilter($this->doCompile($this->preFilter($_content), true)); if (!empty($this->required_plugins[ 'compiled' ]) || !empty($this->required_plugins[ 'nocache' ])) { $_compiled_code = '<?php ' . $this->compileRequiredPlugins() . "?>\n" . $_compiled_code; } @@ -640,7 +654,18 @@ abstract class Smarty_Internal_TemplateCompilerBase return $func_name . '(' . $parameter[ 0 ] . ')'; } } else { - return $name . '(' . implode(',', $parameter) . ')'; + + if ( + !$this->smarty->loadPlugin('smarty_modifiercompiler_' . $name) + && !isset($this->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$name]) + && !in_array($name, ['time', 'join', 'is_array', 'in_array', 'count']) + ) { + trigger_error('Using unregistered function "' . $name . '" in a template is deprecated and will be ' . + 'removed in a future release. Use Smarty::registerPlugin to explicitly register ' . + 'a custom modifier.', E_USER_DEPRECATED); + } + + return $name . '(' . implode(',', $parameter) . ')'; } } else { $this->trigger_template_error("unknown function '{$name}'"); diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php index a2dd0d6fb..c37d3c187 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templateparser.php @@ -2425,6 +2425,9 @@ public static $yy_action = array( if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) { $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; } else { + trigger_error('Using unregistered static method "' . $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor[0] . '" in a template is deprecated and will be ' . + 'removed in a future release. Use Smarty::registerClass to explicitly register ' . + 'a class for access.', E_USER_DEPRECATED); $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor[0].$this->yystack[$this->yyidx + 0]->minor[1]; } } else { diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_security.php b/vendor/smarty/smarty/libs/sysplugins/smarty_security.php index 97cd0521d..49ae2a386 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_security.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_security.php @@ -253,7 +253,7 @@ class Smarty_Security * * @param string $function_name * @param object $compiler compiler object - * + * @deprecated * @return boolean true if function is trusted */ public function isTrustedPhpFunction($function_name, $compiler) diff --git a/vendor/smarty/smarty/run-tests-for-all-php-versions.sh b/vendor/smarty/smarty/run-tests-for-all-php-versions.sh index 79bebb8a6..23541b519 100755 --- a/vendor/smarty/smarty/run-tests-for-all-php-versions.sh +++ b/vendor/smarty/smarty/run-tests-for-all-php-versions.sh @@ -5,11 +5,13 @@ # - ./run-tests-for-all-php-versions.sh --group 20221124 # - ./run-tests-for-all-php-versions.sh --exclude-group slow -docker-compose run php71 ./run-tests.sh $@ && \ -docker-compose run php72 ./run-tests.sh $@ && \ -docker-compose run php73 ./run-tests.sh $@ && \ -docker-compose run php74 ./run-tests.sh $@ && \ -docker-compose run php80 ./run-tests.sh $@ && \ -docker-compose run php81 ./run-tests.sh $@ && \ -docker-compose run php82 ./run-tests.sh $@ && \ -docker-compose run php83 ./run-tests.sh $@ +COMPOSE_CMD="mutagen-compose" + +$COMPOSE_CMD run --rm php71 ./run-tests.sh $@ && \ +$COMPOSE_CMD run --rm php72 ./run-tests.sh $@ && \ +$COMPOSE_CMD run --rm php73 ./run-tests.sh $@ && \ +$COMPOSE_CMD run --rm php74 ./run-tests.sh $@ && \ +$COMPOSE_CMD run --rm php80 ./run-tests.sh $@ && \ +$COMPOSE_CMD run --rm php81 ./run-tests.sh $@ && \ +$COMPOSE_CMD run --rm php82 ./run-tests.sh $@ && \ +$COMPOSE_CMD run --rm php83 ./run-tests.sh $@ diff --git a/vendor/spomky-labs/otphp/README.md b/vendor/spomky-labs/otphp/README.md index b23282ea1..542de6fbd 100644 --- a/vendor/spomky-labs/otphp/README.md +++ b/vendor/spomky-labs/otphp/README.md @@ -2,6 +2,7 @@ TOTP / HOTP library in PHP ==========================  + [](https://packagist.org/packages/spomky-labs/otphp) [](https://packagist.org/packages/spomky-labs/otphp) diff --git a/vendor/spomky-labs/otphp/composer.json b/vendor/spomky-labs/otphp/composer.json index 080df371a..33901f793 100644 --- a/vendor/spomky-labs/otphp/composer.json +++ b/vendor/spomky-labs/otphp/composer.json @@ -22,17 +22,17 @@ }, "require-dev": { "ekino/phpstan-banned-code": "^1.0", - "infection/infection": "^0.26", + "infection/infection": "^0.26|^0.27|^0.28", "php-parallel-lint/php-parallel-lint": "^1.3", "phpstan/phpstan": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5.26", + "phpunit/phpunit": "^9.5.26|^10.0|^11.0", "qossmic/deptrac-shim": "^1.0", - "rector/rector": "^0.15", - "symfony/phpunit-bridge": "^6.1", - "symplify/easy-coding-standard": "^11.0" + "rector/rector": "1.0", + "symfony/phpunit-bridge": "^6.1|^7.0", + "symplify/easy-coding-standard": "^12.0" }, "autoload": { "psr-4": { "OTPHP\\": "src/" } diff --git a/vendor/spomky-labs/otphp/src/Factory.php b/vendor/spomky-labs/otphp/src/Factory.php index 409d8751e..f58e8385c 100644 --- a/vendor/spomky-labs/otphp/src/Factory.php +++ b/vendor/spomky-labs/otphp/src/Factory.php @@ -4,10 +4,10 @@ declare(strict_types=1); namespace OTPHP; -use function assert; -use function count; use InvalidArgumentException; use Throwable; +use function assert; +use function count; /** * This class is used to load OTP object from a provisioning Uri. diff --git a/vendor/spomky-labs/otphp/src/OTP.php b/vendor/spomky-labs/otphp/src/OTP.php index 4765d49eb..944ed8f62 100644 --- a/vendor/spomky-labs/otphp/src/OTP.php +++ b/vendor/spomky-labs/otphp/src/OTP.php @@ -4,14 +4,14 @@ declare(strict_types=1); namespace OTPHP; -use function assert; -use function chr; -use function count; use Exception; use InvalidArgumentException; -use function is_string; use ParagonIE\ConstantTime\Base32; use RuntimeException; +use function assert; +use function chr; +use function count; +use function is_string; use const STR_PAD_LEFT; abstract class OTP implements OTPInterface @@ -100,7 +100,7 @@ abstract class OTP implements OTPInterface $this->hasColon($label) === false || throw new InvalidArgumentException('Label must not contain a colon.'); $options = [...$options, ...$this->getParameters()]; $this->filterOptions($options); - $params = str_replace(['+', '%7E'], ['%20', '~'], http_build_query($options)); + $params = str_replace(['+', '%7E'], ['%20', '~'], http_build_query($options, '', '&')); return sprintf( 'otpauth://%s/%s?%s', diff --git a/vendor/spomky-labs/otphp/src/ParameterTrait.php b/vendor/spomky-labs/otphp/src/ParameterTrait.php index 3b2641e0c..dc92861c4 100644 --- a/vendor/spomky-labs/otphp/src/ParameterTrait.php +++ b/vendor/spomky-labs/otphp/src/ParameterTrait.php @@ -4,10 +4,10 @@ declare(strict_types=1); namespace OTPHP; +use InvalidArgumentException; use function array_key_exists; use function assert; use function in_array; -use InvalidArgumentException; use function is_int; use function is_string; diff --git a/vendor/spomky-labs/otphp/src/TOTP.php b/vendor/spomky-labs/otphp/src/TOTP.php index 3a7d72870..8a1cfeba1 100644 --- a/vendor/spomky-labs/otphp/src/TOTP.php +++ b/vendor/spomky-labs/otphp/src/TOTP.php @@ -4,8 +4,8 @@ declare(strict_types=1); namespace OTPHP; -use function assert; use InvalidArgumentException; +use function assert; use function is_int; /** @@ -133,23 +133,21 @@ final class TOTP extends OTP implements TOTPInterface */ protected function getParameterMap(): array { - return array_merge( - parent::getParameterMap(), - [ - 'period' => static function ($value): int { - (int) $value > 0 || throw new InvalidArgumentException('Period must be at least 1.'); - - return (int) $value; - }, - 'epoch' => static function ($value): int { - (int) $value >= 0 || throw new InvalidArgumentException( - 'Epoch must be greater than or equal to 0.' - ); - - return (int) $value; - }, - ] - ); + return [ + ...parent::getParameterMap(), + 'period' => static function ($value): int { + (int) $value > 0 || throw new InvalidArgumentException('Period must be at least 1.'); + + return (int) $value; + }, + 'epoch' => static function ($value): int { + (int) $value >= 0 || throw new InvalidArgumentException( + 'Epoch must be greater than or equal to 0.' + ); + + return (int) $value; + }, + ]; } /** diff --git a/vendor/spomky-labs/otphp/src/Url.php b/vendor/spomky-labs/otphp/src/Url.php index 76919d27a..a97ca6821 100644 --- a/vendor/spomky-labs/otphp/src/Url.php +++ b/vendor/spomky-labs/otphp/src/Url.php @@ -4,8 +4,8 @@ declare(strict_types=1); namespace OTPHP; -use function array_key_exists; use InvalidArgumentException; +use function array_key_exists; use function is_string; /** diff --git a/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php b/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php index eb5952ee3..5ff93fcaf 100644 --- a/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php +++ b/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php @@ -32,7 +32,7 @@ if (\PHP_VERSION_ID >= 70400 && extension_loaded('curl')) { } if (is_object($value) ? !method_exists($value, '__toString') : !is_scalar($value)) { - throw new \TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string'); + throw new TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string'); } $this->name = 'data://application/octet-stream;base64,'.base64_encode($value); diff --git a/vendor/symfony/polyfill-php81/composer.json b/vendor/symfony/polyfill-php81/composer.json index 381af79ac..28b6408ea 100644 --- a/vendor/symfony/polyfill-php81/composer.json +++ b/vendor/symfony/polyfill-php81/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=7.1" + "php": ">=7.2" }, "autoload": { "psr-4": { "Symfony\\Polyfill\\Php81\\": "" }, diff --git a/view/css/mod_help.css b/view/css/mod_help.css index 3c3bc195f..d596048c9 100644 --- a/view/css/mod_help.css +++ b/view/css/mod_help.css @@ -11,10 +11,22 @@ padding-bottom: 0.3em; } +#doco-content img { + width: 100%; +} + #region_1 .widget ul ul { list-style-type: none; } +#doco-top-toc-wrapper { + margin-bottom: 1em; +} + +#doco-top-toc-wrapper > summary { + font-size: large; +} + .toc-content li, #doco-top-toc li { padding: 3px 0px; @@ -24,3 +36,12 @@ padding-left: 20px; } +.selected-doco-nav > a { + font-weight: bold; + color: var(--bs-link-hover-color); +} + +#help-content pre code { + overflow-x: auto; + white-space: pre; +} diff --git a/view/js/mod_help.js b/view/js/mod_help.js index abd0d1194..8308f23ec 100644 --- a/view/js/mod_help.js +++ b/view/js/mod_help.js @@ -1,14 +1,3 @@ -function docoTocToggle() { - if ($('#doco-top-toc').is(':visible')) { - $('#doco-toc-toggle').removeClass('bi-gear').addClass('bi-caret-right'); - } else { - $('#doco-toc-toggle').removeClass('bi-caret-right').addClass('bi-caret-down'); - } - $('#doco-top-toc').toggle(); - - return false; -} - toc = {}; // Generate the table of contents in the side nav menu (see view/tpl/help.tpl) $(document).ready(function () { diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index ec8ce42b3..6e6e19532 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -150,20 +150,6 @@ input[type=text], textarea { color: var(--bs-body-color); } -.selected-doco-nav { - font-weight: bold; - text-shadow: 2px 2px 3px lightgray; -} - -#doco-content img { - width: 100%; -} - -#help-content pre code { - overflow-x: auto; - white-space: pre; -} - .heart { color: #FF0000; } diff --git a/view/tpl/help.tpl b/view/tpl/help.tpl index 68e1c6694..8b7669c75 100644 --- a/view/tpl/help.tpl +++ b/view/tpl/help.tpl @@ -7,14 +7,13 @@ {{$module->missing_translation_message()}} </div> {{/if}} - <div class="section-content-wrapper" id="doco-content"> - <h3 id="doco-top-toc-heading"> - <span class="fakelink" onclick="docoTocToggle(); return false;"> - <i class="bi bi-caret-right fakelink" id="doco-toc-toggle"></i> - {{$module->get_toc_heading()}} - </span> - </h3> - <ul id="doco-top-toc" style="margin-bottom: 1.5em; display: none;"></ul> - {{$module->render_content()}} + <div class="section-content-wrapper"> + <details id="doco-top-toc-wrapper"> + <summary id="doco-top-toc-heading">{{$module->get_toc_heading()}}</summary> + <ul id="doco-top-toc"></ul> + </details> + <div id="doco-content"> + {{$module->render_content()}} + </div> </div> </div> |