diff --git a/composer.lock b/composer.lock index 582b453..73a079a 100644 --- a/composer.lock +++ b/composer.lock @@ -114,20 +114,20 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.6", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" + "reference": "d2e16653a734c8784c1851ad68b02f997b53ca82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", - "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d2e16653a734c8784c1851ad68b02f997b53ca82", + "reference": "d2e16653a734c8784c1851ad68b02f997b53ca82", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "conflict": { "phpunit/phpunit": "<=7.5 || >=14" @@ -156,9 +156,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.6" + "source": "https://github.com/doctrine/deprecations/tree/1.2.0" }, - "time": "2026-02-07T07:09:04+00:00" + "time": "2026-11-11T10:04:49+00:00" }, { "name": "doctrine/event-manager", @@ -431,26 +431,26 @@ }, { "name": "egulias/email-validator", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa" + "reference": "9bef884e12278a7b89b64adbfb9379c021d3c102" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", - "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/9bef884e12278a7b89b64adbfb9379c021d3c102", + "reference": "9bef884e12278a7b89b64adbfb9379c021d3c102", "shasum": "" }, "require": { - "doctrine/lexer": "^2.0 || ^3.0", + "doctrine/lexer": "^3.0.3", "php": ">=8.1", - "symfony/polyfill-intl-idn": "^1.26" + "symfony/polyfill-intl-idn": "^1.43" }, "require-dev": { - "phpunit/phpunit": "^10.2", - "vimeo/psalm": "^5.12" + "phpunit/phpunit": "^10.5.67", + "vimeo/psalm": "^5.26.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -486,7 +486,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.4" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.5" }, "funding": [ { @@ -494,7 +494,7 @@ "type": "github" } ], - "time": "2025-03-06T22:45:56+00:00" + "time": "2026-11-22T16:52:20+00:00" }, { "name": "psr/cache", @@ -748,16 +748,16 @@ }, { "name": "symfony/cache", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "bbaa2ca4a93a94532285bdd5a0caf225d34ff578" + "reference": "c0e98fd4826f7edbcca311a28ccefa1fc833e6f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/bbaa2ca4a93a94532285bdd5a0caf225d34ff578", - "reference": "bbaa2ca4a93a94532285bdd5a0caf225d34ff578", + "url": "https://api.github.com/repos/symfony/cache/zipball/c0e98fd4826f7edbcca311a28ccefa1fc833e6f2", + "reference": "c0e98fd4826f7edbcca311a28ccefa1fc833e6f2", "shasum": "" }, "require": { @@ -827,7 +827,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v7.4.23" + "source": "https://github.com/symfony/cache/tree/v7.4.25" }, "funding": [ { @@ -847,7 +847,7 @@ "type": "tidelift" } ], - "time": "2026-11-01T22:26:51+00:00" + "time": "2026-11-27T14:00:49+00:00" }, { "name": "symfony/cache-contracts", @@ -1009,16 +1009,16 @@ }, { "name": "symfony/config", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "8ef666abf731e85e59cf478929dda6c7cb2fa9c4" + "reference": "5faae9e1d39de4a73159858c341dbb31a679aabf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/8ef666abf731e85e59cf478929dda6c7cb2fa9c4", - "reference": "8ef666abf731e85e59cf478929dda6c7cb2fa9c4", + "url": "https://api.github.com/repos/symfony/config/zipball/5faae9e1d39de4a73159858c341dbb31a679aabf", + "reference": "5faae9e1d39de4a73159858c341dbb31a679aabf", "shasum": "" }, "require": { @@ -1064,7 +1064,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.4.23" + "source": "https://github.com/symfony/config/tree/v7.4.24" }, "funding": [ { @@ -1084,20 +1084,20 @@ "type": "tidelift" } ], - "time": "2026-11-04T08:27:22+00:00" + "time": "2026-11-09T20:02:17+00:00" }, { "name": "symfony/console", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "81957c2440c05c962fe8291f318de6e85f8db330" + "reference": "542ec4ffb13541c31917ba720a2204f23c8e8d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/81957c2440c05c962fe8291f318de6e85f8db330", - "reference": "81957c2440c05c962fe8291f318de6e85f8db330", + "url": "https://api.github.com/repos/symfony/console/zipball/542ec4ffb13541c31917ba720a2204f23c8e8d08", + "reference": "542ec4ffb13541c31917ba720a2204f23c8e8d08", "shasum": "" }, "require": { @@ -1162,7 +1162,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.23" + "source": "https://github.com/symfony/console/tree/v7.4.24" }, "funding": [ { @@ -1182,20 +1182,20 @@ "type": "tidelift" } ], - "time": "2026-11-03T21:47:07+00:00" + "time": "2026-11-24T15:38:27+00:00" }, { "name": "symfony/dependency-injection", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "4df0d83a8253d95b222c2f136b9dca3a1a9451a7" + "reference": "54c179c4f6c6571d5af6dd87b6cdb04a01d851eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/4df0d83a8253d95b222c2f136b9dca3a1a9451a7", - "reference": "4df0d83a8253d95b222c2f136b9dca3a1a9451a7", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54c179c4f6c6571d5af6dd87b6cdb04a01d851eb", + "reference": "54c179c4f6c6571d5af6dd87b6cdb04a01d851eb", "shasum": "" }, "require": { @@ -1246,7 +1246,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.4.23" + "source": "https://github.com/symfony/dependency-injection/tree/v7.4.25" }, "funding": [ { @@ -1266,7 +1266,7 @@ "type": "tidelift" } ], - "time": "2026-11-01T17:38:00+00:00" + "time": "2026-11-25T09:12:27+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1666,16 +1666,16 @@ }, { "name": "symfony/filesystem", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "53d609da66578dad5a39fe290e8f924ec8f05e93" + "reference": "c6adf2262feb9e08ba64632d2703987c24555e0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/53d609da66578dad5a39fe290e8f924ec8f05e93", - "reference": "53d609da66578dad5a39fe290e8f924ec8f05e93", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c6adf2262feb9e08ba64632d2703987c24555e0d", + "reference": "c6adf2262feb9e08ba64632d2703987c24555e0d", "shasum": "" }, "require": { @@ -1712,7 +1712,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.4.23" + "source": "https://github.com/symfony/filesystem/tree/v7.4.25" }, "funding": [ { @@ -1732,20 +1732,20 @@ "type": "tidelift" } ], - "time": "2026-11-04T08:27:22+00:00" + "time": "2026-11-27T10:49:08+00:00" }, { "name": "symfony/finder", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "c723f990aefe8c1053b18374faf4231eba84f518" + "reference": "9e170627d10f300da6854be9efbfe3040f17716e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/c723f990aefe8c1053b18374faf4231eba84f518", - "reference": "c723f990aefe8c1053b18374faf4231eba84f518", + "url": "https://api.github.com/repos/symfony/finder/zipball/9e170627d10f300da6854be9efbfe3040f17716e", + "reference": "9e170627d10f300da6854be9efbfe3040f17716e", "shasum": "" }, "require": { @@ -1780,7 +1780,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.23" + "source": "https://github.com/symfony/finder/tree/v7.4.25" }, "funding": [ { @@ -1800,20 +1800,20 @@ "type": "tidelift" } ], - "time": "2026-11-02T10:56:49+00:00" + "time": "2026-11-27T13:38:24+00:00" }, { "name": "symfony/framework-bundle", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "6a749f2c37cb9def53793633ec72958aaad4b359" + "reference": "9014dc179c0d9b91d86849e3318202b2a1e92353" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/6a749f2c37cb9def53793633ec72958aaad4b359", - "reference": "6a749f2c37cb9def53793633ec72958aaad4b359", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/9014dc179c0d9b91d86849e3318202b2a1e92353", + "reference": "9014dc179c0d9b91d86849e3318202b2a1e92353", "shasum": "" }, "require": { @@ -1937,7 +1937,7 @@ "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v7.4.23" + "source": "https://github.com/symfony/framework-bundle/tree/v7.4.24" }, "funding": [ { @@ -1957,20 +1957,20 @@ "type": "tidelift" } ], - "time": "2026-11-04T07:46:24+00:00" + "time": "2026-11-24T18:01:43+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "7fb73cffa06e2bcc2cb523fcccb1e8174106b206" + "reference": "1ebfef402856383ce114ff009d4fc961bf290743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7fb73cffa06e2bcc2cb523fcccb1e8174106b206", - "reference": "7fb73cffa06e2bcc2cb523fcccb1e8174106b206", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1ebfef402856383ce114ff009d4fc961bf290743", + "reference": "1ebfef402856383ce114ff009d4fc961bf290743", "shasum": "" }, "require": { @@ -2019,7 +2019,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.4.23" + "source": "https://github.com/symfony/http-foundation/tree/v7.4.25" }, "funding": [ { @@ -2039,20 +2039,20 @@ "type": "tidelift" } ], - "time": "2026-11-04T08:27:22+00:00" + "time": "2026-11-27T13:27:53+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "94c57f4c5c45a311d244a0aeadb72b14ee41d25d" + "reference": "b510604a58547c9c28a599a16ad7ab0d8df64076" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/94c57f4c5c45a311d244a0aeadb72b14ee41d25d", - "reference": "94c57f4c5c45a311d244a0aeadb72b14ee41d25d", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b510604a58547c9c28a599a16ad7ab0d8df64076", + "reference": "b510604a58547c9c28a599a16ad7ab0d8df64076", "shasum": "" }, "require": { @@ -2061,7 +2061,7 @@ "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.4|^7.0|^8.0", "symfony/event-dispatcher": "^7.3|^8.0", - "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-foundation": "^7.4.24|^8.1.12", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -2138,7 +2138,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.4.23" + "source": "https://github.com/symfony/http-kernel/tree/v7.4.25" }, "funding": [ { @@ -2158,20 +2158,20 @@ "type": "tidelift" } ], - "time": "2026-11-04T11:26:18+00:00" + "time": "2026-11-27T14:40:20+00:00" }, { "name": "symfony/mailer", - "version": "v7.4.22", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "1aa1e2ee7515826bb17b0ad0d2f16962fcaa7859" + "reference": "19470de2526c9d5cdb136c5574e504024f523882" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/1aa1e2ee7515826bb17b0ad0d2f16962fcaa7859", - "reference": "1aa1e2ee7515826bb17b0ad0d2f16962fcaa7859", + "url": "https://api.github.com/repos/symfony/mailer/zipball/19470de2526c9d5cdb136c5574e504024f523882", + "reference": "19470de2526c9d5cdb136c5574e504024f523882", "shasum": "" }, "require": { @@ -2222,7 +2222,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.4.22" + "source": "https://github.com/symfony/mailer/tree/v7.4.24" }, "funding": [ { @@ -2242,20 +2242,20 @@ "type": "tidelift" } ], - "time": "2026-10-23T16:51:52+00:00" + "time": "2026-11-24T17:14:14+00:00" }, { "name": "symfony/mime", - "version": "v7.4.22", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "94a4c017435bc515f5ac80421a2c555fb9ca3676" + "reference": "de952f839520f9945b337eeab67e49c68b24ea6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/94a4c017435bc515f5ac80421a2c555fb9ca3676", - "reference": "94a4c017435bc515f5ac80421a2c555fb9ca3676", + "url": "https://api.github.com/repos/symfony/mime/zipball/de952f839520f9945b337eeab67e49c68b24ea6b", + "reference": "de952f839520f9945b337eeab67e49c68b24ea6b", "shasum": "" }, "require": { @@ -2311,7 +2311,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.4.22" + "source": "https://github.com/symfony/mime/tree/v7.4.24" }, "funding": [ { @@ -2331,7 +2331,7 @@ "type": "tidelift" } ], - "time": "2026-10-28T17:57:58+00:00" + "time": "2026-11-24T16:26:23+00:00" }, { "name": "symfony/options-resolver", @@ -2406,16 +2406,16 @@ }, { "name": "symfony/password-hasher", - "version": "v7.4.8", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/password-hasher.git", - "reference": "18a7d92126c95962f7efbcc9e421ba710a366847" + "reference": "cc016602beb0b451dda4c9bc9ee688c0cdf47ace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/password-hasher/zipball/18a7d92126c95962f7efbcc9e421ba710a366847", - "reference": "18a7d92126c95962f7efbcc9e421ba710a366847", + "url": "https://api.github.com/repos/symfony/password-hasher/zipball/cc016602beb0b451dda4c9bc9ee688c0cdf47ace", + "reference": "cc016602beb0b451dda4c9bc9ee688c0cdf47ace", "shasum": "" }, "require": { @@ -2458,7 +2458,7 @@ "password" ], "support": { - "source": "https://github.com/symfony/password-hasher/tree/v7.4.8" + "source": "https://github.com/symfony/password-hasher/tree/v7.4.25" }, "funding": [ { @@ -2478,7 +2478,7 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-06-05T06:22:21+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2984,16 +2984,16 @@ }, { "name": "symfony/polyfill-php85", - "version": "v1.43.0", + "version": "v1.44.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php85.git", - "reference": "86a42cbcc07adc331481a5ab310a4024bfc227f6" + "reference": "94c794cb5ba51784bc259f11e9f128593297d8dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/86a42cbcc07adc331481a5ab310a4024bfc227f6", - "reference": "86a42cbcc07adc331481a5ab310a4024bfc227f6", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/94c794cb5ba51784bc259f11e9f128593297d8dc", + "reference": "94c794cb5ba51784bc259f11e9f128593297d8dc", "shasum": "" }, "require": { @@ -3040,7 +3040,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php85/tree/v1.43.0" + "source": "https://github.com/symfony/polyfill-php85/tree/v1.44.0" }, "funding": [ { @@ -3060,20 +3060,20 @@ "type": "tidelift" } ], - "time": "2026-09-25T15:46:47+00:00" + "time": "2026-10-30T15:20:09+00:00" }, { "name": "symfony/property-access", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "4dce45112d7a31d530d2e0e69143fc88eaa1521f" + "reference": "7796c84fd3103385b0ea9f6c6c0ced64ff60c0aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/4dce45112d7a31d530d2e0e69143fc88eaa1521f", - "reference": "4dce45112d7a31d530d2e0e69143fc88eaa1521f", + "url": "https://api.github.com/repos/symfony/property-access/zipball/7796c84fd3103385b0ea9f6c6c0ced64ff60c0aa", + "reference": "7796c84fd3103385b0ea9f6c6c0ced64ff60c0aa", "shasum": "" }, "require": { @@ -3121,7 +3121,7 @@ "reflection" ], "support": { - "source": "https://github.com/symfony/property-access/tree/v7.4.23" + "source": "https://github.com/symfony/property-access/tree/v7.4.25" }, "funding": [ { @@ -3141,27 +3141,27 @@ "type": "tidelift" } ], - "time": "2026-11-01T19:17:22+00:00" + "time": "2026-11-27T09:05:23+00:00" }, { "name": "symfony/property-info", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "1eeaa666bcd1864b883b98cad9e5188064ddac26" + "reference": "c92c42e58f2c1435561f4c35fc99690378fe0c3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/1eeaa666bcd1864b883b98cad9e5188064ddac26", - "reference": "1eeaa666bcd1864b883b98cad9e5188064ddac26", + "url": "https://api.github.com/repos/symfony/property-info/zipball/c92c42e58f2c1435561f4c35fc99690378fe0c3b", + "reference": "c92c42e58f2c1435561f4c35fc99690378fe0c3b", "shasum": "" }, "require": { "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/string": "^6.4|^7.0|^8.0", - "symfony/type-info": "^7.4.7|^8.0.7" + "symfony/type-info": "^7.4.24|^8.1.12" }, "conflict": { "phpdocumentor/reflection-docblock": "<5.2|>=7", @@ -3211,7 +3211,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v7.4.23" + "source": "https://github.com/symfony/property-info/tree/v7.4.24" }, "funding": [ { @@ -3231,20 +3231,20 @@ "type": "tidelift" } ], - "time": "2026-11-02T10:56:49+00:00" + "time": "2026-11-23T18:53:28+00:00" }, { "name": "symfony/rate-limiter", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/rate-limiter.git", - "reference": "a65b8280000598b80b4456004280a56fdad011b3" + "reference": "363f4fe1491bb2757405f4ad555457298e84c1dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/rate-limiter/zipball/a65b8280000598b80b4456004280a56fdad011b3", - "reference": "a65b8280000598b80b4456004280a56fdad011b3", + "url": "https://api.github.com/repos/symfony/rate-limiter/zipball/363f4fe1491bb2757405f4ad555457298e84c1dd", + "reference": "363f4fe1491bb2757405f4ad555457298e84c1dd", "shasum": "" }, "require": { @@ -3285,7 +3285,7 @@ "rate-limiter" ], "support": { - "source": "https://github.com/symfony/rate-limiter/tree/v7.4.23" + "source": "https://github.com/symfony/rate-limiter/tree/v7.4.24" }, "funding": [ { @@ -3305,20 +3305,20 @@ "type": "tidelift" } ], - "time": "2026-11-01T19:17:22+00:00" + "time": "2026-11-10T01:07:41+00:00" }, { "name": "symfony/routing", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0000ade604b7bc798cb1e75edf6f17df48185f73" + "reference": "63fd985c6afe7ac69f89fb90a72715ca20cddc08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0000ade604b7bc798cb1e75edf6f17df48185f73", - "reference": "0000ade604b7bc798cb1e75edf6f17df48185f73", + "url": "https://api.github.com/repos/symfony/routing/zipball/63fd985c6afe7ac69f89fb90a72715ca20cddc08", + "reference": "63fd985c6afe7ac69f89fb90a72715ca20cddc08", "shasum": "" }, "require": { @@ -3370,7 +3370,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.4.23" + "source": "https://github.com/symfony/routing/tree/v7.4.24" }, "funding": [ { @@ -3390,20 +3390,20 @@ "type": "tidelift" } ], - "time": "2026-11-04T08:27:22+00:00" + "time": "2026-11-24T18:01:43+00:00" }, { "name": "symfony/security-bundle", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/security-bundle.git", - "reference": "1cb338633172a5ce2fb92b31f5d39315f4aa4c00" + "reference": "6992b2fabb03dac327db48e383b1a9c067eaa26c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-bundle/zipball/1cb338633172a5ce2fb92b31f5d39315f4aa4c00", - "reference": "1cb338633172a5ce2fb92b31f5d39315f4aa4c00", + "url": "https://api.github.com/repos/symfony/security-bundle/zipball/6992b2fabb03dac327db48e383b1a9c067eaa26c", + "reference": "6992b2fabb03dac327db48e383b1a9c067eaa26c", "shasum": "" }, "require": { @@ -3420,7 +3420,7 @@ "symfony/password-hasher": "^6.4|^7.0|^8.0", "symfony/security-core": "^7.4.22|^8.1.10", "symfony/security-csrf": "^6.4|^7.0|^8.0", - "symfony/security-http": "^7.4.21|^8.1.9", + "symfony/security-http": "^7.4.24|^8.1.12", "symfony/service-contracts": "^2.5|^3" }, "conflict": { @@ -3483,7 +3483,7 @@ "description": "Provides a tight integration of the Security component into the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-bundle/tree/v7.4.23" + "source": "https://github.com/symfony/security-bundle/tree/v7.4.24" }, "funding": [ { @@ -3503,20 +3503,20 @@ "type": "tidelift" } ], - "time": "2026-11-04T08:27:22+00:00" + "time": "2026-11-25T08:05:02+00:00" }, { "name": "symfony/security-core", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "c93b2194c0255496c2c0ac999821fa7f5296c7cc" + "reference": "a5878baccfd19063b7990985df30039230557164" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/c93b2194c0255496c2c0ac999821fa7f5296c7cc", - "reference": "c93b2194c0255496c2c0ac999821fa7f5296c7cc", + "url": "https://api.github.com/repos/symfony/security-core/zipball/a5878baccfd19063b7990985df30039230557164", + "reference": "a5878baccfd19063b7990985df30039230557164", "shasum": "" }, "require": { @@ -3575,7 +3575,7 @@ "description": "Symfony Security Component - Core Library", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-core/tree/v7.4.23" + "source": "https://github.com/symfony/security-core/tree/v7.4.25" }, "funding": [ { @@ -3595,20 +3595,20 @@ "type": "tidelift" } ], - "time": "2026-11-01T19:17:22+00:00" + "time": "2026-11-25T12:48:49+00:00" }, { "name": "symfony/security-csrf", - "version": "v7.4.8", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/security-csrf.git", - "reference": "16b3aa2f67d02fb0dbd013a8759bbe90daaa9c5d" + "reference": "5f21eda04b2c50c6d2e63d0c93c519d8f837bd8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-csrf/zipball/16b3aa2f67d02fb0dbd013a8759bbe90daaa9c5d", - "reference": "16b3aa2f67d02fb0dbd013a8759bbe90daaa9c5d", + "url": "https://api.github.com/repos/symfony/security-csrf/zipball/5f21eda04b2c50c6d2e63d0c93c519d8f837bd8f", + "reference": "5f21eda04b2c50c6d2e63d0c93c519d8f837bd8f", "shasum": "" }, "require": { @@ -3649,7 +3649,7 @@ "description": "Symfony Security Component - CSRF Library", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-csrf/tree/v7.4.8" + "source": "https://github.com/symfony/security-csrf/tree/v7.4.25" }, "funding": [ { @@ -3669,20 +3669,20 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-06-05T06:22:21+00:00" }, { "name": "symfony/security-http", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/security-http.git", - "reference": "ea0623a02764025268bd928810f012767ea1965a" + "reference": "1a821c485fa8ac4dd56b97bb9d4fef5a02e63745" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-http/zipball/ea0623a02764025268bd928810f012767ea1965a", - "reference": "ea0623a02764025268bd928810f012767ea1965a", + "url": "https://api.github.com/repos/symfony/security-http/zipball/1a821c485fa8ac4dd56b97bb9d4fef5a02e63745", + "reference": "1a821c485fa8ac4dd56b97bb9d4fef5a02e63745", "shasum": "" }, "require": { @@ -3699,6 +3699,7 @@ "conflict": { "symfony/clock": "<6.4", "symfony/http-client-contracts": "<3.0", + "symfony/rate-limiter": "<6.4.33|>=7,<7.4.5|>=8,<8.0.5", "symfony/security-bundle": "<6.4", "symfony/security-csrf": "<6.4" }, @@ -3742,7 +3743,7 @@ "description": "Symfony Security Component - HTTP Integration", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/security-http/tree/v7.4.23" + "source": "https://github.com/symfony/security-http/tree/v7.4.24" }, "funding": [ { @@ -3762,7 +3763,7 @@ "type": "tidelift" } ], - "time": "2026-11-04T08:27:22+00:00" + "time": "2026-11-24T18:01:43+00:00" }, { "name": "symfony/service-contracts", @@ -3853,16 +3854,16 @@ }, { "name": "symfony/stopwatch", - "version": "v7.4.8", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "70a852d72fec4d51efb1f48dcd968efcaf5ccb89" + "reference": "206e421a5e353b3bdf78b1b88b9225b3017f3f1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/70a852d72fec4d51efb1f48dcd968efcaf5ccb89", - "reference": "70a852d72fec4d51efb1f48dcd968efcaf5ccb89", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/206e421a5e353b3bdf78b1b88b9225b3017f3f1c", + "reference": "206e421a5e353b3bdf78b1b88b9225b3017f3f1c", "shasum": "" }, "require": { @@ -3895,7 +3896,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v7.4.8" + "source": "https://github.com/symfony/stopwatch/tree/v7.4.25" }, "funding": [ { @@ -3915,20 +3916,20 @@ "type": "tidelift" } ], - "time": "2026-03-24T13:12:05+00:00" + "time": "2026-11-27T08:52:53+00:00" }, { "name": "symfony/string", - "version": "v7.4.22", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8dff7da3a56638f1d189c5368183294102de4ced" + "reference": "93c0ef02c1548d3b9498e8c4cc92f77106ca5d46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8dff7da3a56638f1d189c5368183294102de4ced", - "reference": "8dff7da3a56638f1d189c5368183294102de4ced", + "url": "https://api.github.com/repos/symfony/string/zipball/93c0ef02c1548d3b9498e8c4cc92f77106ca5d46", + "reference": "93c0ef02c1548d3b9498e8c4cc92f77106ca5d46", "shasum": "" }, "require": { @@ -3986,7 +3987,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.4.22" + "source": "https://github.com/symfony/string/tree/v7.4.25" }, "funding": [ { @@ -4006,7 +4007,7 @@ "type": "tidelift" } ], - "time": "2026-10-23T16:51:52+00:00" + "time": "2026-11-25T18:09:18+00:00" }, { "name": "symfony/translation-contracts", @@ -4092,16 +4093,16 @@ }, { "name": "symfony/twig-bridge", - "version": "v7.4.22", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/twig-bridge.git", - "reference": "c959c7d2396e72e64c899fc9d0abba50733ea042" + "reference": "e8cf2debed8decf4431d045245b2fe29f060beb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/c959c7d2396e72e64c899fc9d0abba50733ea042", - "reference": "c959c7d2396e72e64c899fc9d0abba50733ea042", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/e8cf2debed8decf4431d045245b2fe29f060beb4", + "reference": "e8cf2debed8decf4431d045245b2fe29f060beb4", "shasum": "" }, "require": { @@ -4183,7 +4184,7 @@ "description": "Provides integration for Twig with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bridge/tree/v7.4.22" + "source": "https://github.com/symfony/twig-bridge/tree/v7.4.24" }, "funding": [ { @@ -4203,7 +4204,7 @@ "type": "tidelift" } ], - "time": "2026-10-15T16:00:28+00:00" + "time": "2026-11-17T16:36:55+00:00" }, { "name": "symfony/twig-bundle", @@ -4297,16 +4298,16 @@ }, { "name": "symfony/type-info", - "version": "v7.4.23", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/type-info.git", - "reference": "eca5fdb294539268ad3245b2214f32f24b337e09" + "reference": "db2557abeeca72af8c80695aa0c9d4d3ebea37fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/type-info/zipball/eca5fdb294539268ad3245b2214f32f24b337e09", - "reference": "eca5fdb294539268ad3245b2214f32f24b337e09", + "url": "https://api.github.com/repos/symfony/type-info/zipball/db2557abeeca72af8c80695aa0c9d4d3ebea37fb", + "reference": "db2557abeeca72af8c80695aa0c9d4d3ebea37fb", "shasum": "" }, "require": { @@ -4356,7 +4357,7 @@ "type" ], "support": { - "source": "https://github.com/symfony/type-info/tree/v7.4.23" + "source": "https://github.com/symfony/type-info/tree/v7.4.24" }, "funding": [ { @@ -4376,20 +4377,20 @@ "type": "tidelift" } ], - "time": "2026-11-02T09:31:16+00:00" + "time": "2026-11-16T09:03:27+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.4.22", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "6e6ff33ea8cf5df27f00a5561ebd5ee9bd7f1618" + "reference": "04112d9b77043f1ffb2d70d78aaf09c067c80079" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/6e6ff33ea8cf5df27f00a5561ebd5ee9bd7f1618", - "reference": "6e6ff33ea8cf5df27f00a5561ebd5ee9bd7f1618", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/04112d9b77043f1ffb2d70d78aaf09c067c80079", + "reference": "04112d9b77043f1ffb2d70d78aaf09c067c80079", "shasum": "" }, "require": { @@ -4443,7 +4444,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.4.22" + "source": "https://github.com/symfony/var-dumper/tree/v7.4.24" }, "funding": [ { @@ -4463,7 +4464,7 @@ "type": "tidelift" } ], - "time": "2026-10-25T21:04:04+00:00" + "time": "2026-11-12T10:19:45+00:00" }, { "name": "symfony/var-exporter", @@ -4548,16 +4549,16 @@ }, { "name": "symfony/yaml", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "1e601207ffe627a2e621faa9d661f1d32dcf1cec" + "reference": "539dd469c25466d7225d6cadac1795201c9cf454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/1e601207ffe627a2e621faa9d661f1d32dcf1cec", - "reference": "1e601207ffe627a2e621faa9d661f1d32dcf1cec", + "url": "https://api.github.com/repos/symfony/yaml/zipball/539dd469c25466d7225d6cadac1795201c9cf454", + "reference": "539dd469c25466d7225d6cadac1795201c9cf454", "shasum": "" }, "require": { @@ -4600,7 +4601,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.4.23" + "source": "https://github.com/symfony/yaml/tree/v7.4.25" }, "funding": [ { @@ -4620,20 +4621,20 @@ "type": "tidelift" } ], - "time": "2026-11-04T08:27:22+00:00" + "time": "2026-11-27T13:07:44+00:00" }, { "name": "twig/twig", - "version": "v3.30.0", + "version": "v3.31.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "8c737079b726af72ff8ef3c595be9f6a810ea1ef" + "reference": "6f6ec372231b53d1d564567a78beb8844cafa132" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/8c737079b726af72ff8ef3c595be9f6a810ea1ef", - "reference": "8c737079b726af72ff8ef3c595be9f6a810ea1ef", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/6f6ec372231b53d1d564567a78beb8844cafa132", + "reference": "6f6ec372231b53d1d564567a78beb8844cafa132", "shasum": "" }, "require": { @@ -4688,7 +4689,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.30.0" + "source": "https://github.com/twigphp/Twig/tree/v3.31.1" }, "funding": [ { @@ -4700,7 +4701,7 @@ "type": "tidelift" } ], - "time": "2026-09-25T13:20:01+00:00" + "time": "2026-11-24T12:48:40+00:00" } ], "packages-dev": [ @@ -7578,16 +7579,16 @@ }, { "name": "symfony/browser-kit", - "version": "v7.4.23", + "version": "v7.4.25", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "a0d19ca90c1fcce29d3337decb761b5adb808965" + "reference": "5a02c9be0e0dc712deee3146e355f85835dd66d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/a0d19ca90c1fcce29d3337decb761b5adb808965", - "reference": "a0d19ca90c1fcce29d3337decb761b5adb808965", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/5a02c9be0e0dc712deee3146e355f85835dd66d0", + "reference": "5a02c9be0e0dc712deee3146e355f85835dd66d0", "shasum": "" }, "require": { @@ -7628,7 +7629,7 @@ "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/browser-kit/tree/v7.4.23" + "source": "https://github.com/symfony/browser-kit/tree/v7.4.25" }, "funding": [ { @@ -7648,7 +7649,7 @@ "type": "tidelift" } ], - "time": "2026-11-01T07:00:22+00:00" + "time": "2026-11-27T13:50:25+00:00" }, { "name": "symfony/css-selector", @@ -8037,16 +8038,16 @@ }, { "name": "symfony/process", - "version": "v7.4.22", + "version": "v7.4.24", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "a5a6912edbbfc4c98cd080bc4bbe37c8e7eeb20a" + "reference": "e88ac51768062ad548bf2f900c52231e7e83e475" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/a5a6912edbbfc4c98cd080bc4bbe37c8e7eeb20a", - "reference": "a5a6912edbbfc4c98cd080bc4bbe37c8e7eeb20a", + "url": "https://api.github.com/repos/symfony/process/zipball/e88ac51768062ad548bf2f900c52231e7e83e475", + "reference": "e88ac51768062ad548bf2f900c52231e7e83e475", "shasum": "" }, "require": { @@ -8078,7 +8079,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.4.22" + "source": "https://github.com/symfony/process/tree/v7.4.24" }, "funding": [ { @@ -8098,7 +8099,7 @@ "type": "tidelift" } ], - "time": "2026-10-25T14:40:16+00:00" + "time": "2026-11-23T08:23:51+00:00" }, { "name": "theseer/tokenizer", diff --git a/docs/STATUS.md b/docs/STATUS.md index 9d7cfd4..78fde08 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -1,5 +1,28 @@ # Projektstatus +## Sicherheits- und Fehlerprüfung des ganzen Codes (03.12.2026, noch nicht committet) + +**Anlass:** Umut: „Sicherheits- und Bugscan“. Codex `-Alles` (Bericht `reports/codex-review-2026-12-03-1940.md`) plus drei eigene Prüfungen (Rechte/CSRF, Dateien/Pakete/Updater, XSS/Formulare/Zentrale), `composer audit`, `npm audit`. Jeder Befund am Code nachvollzogen. + +**Behoben (je mit Regressionstest, der ohne Fix scheitert):** +- Abhängigkeiten: Symfony 7.4.23 → 7.4.24/25, Twig 3.30.0 → 3.31.1 (19 Hinweise, u. a. Login-Weiterleitung auf fremden Host, `access_control` mit Unanimous-Strategie, Mailer-STARTTLS); npm `ws` (nur Entwicklungswerkzeuge). Beide Audits jetzt leer. +- Formulare: Der Honigtopf hieß `website` – der Formulareditor macht aus der Beschriftung „Website“ genau diesen Feldnamen; jede Anfrage mit ausgefüllter Adresse verschwand still. Honigtopf heißt jetzt `homepage-url` (alter Name gilt für Seiten aus dem Zwischenspeicher weiter, wenn das Formular kein Feld so nennt). Feldnamen `page`, `block`, `language`, `issued` sind reserviert. Einzeilige Felder verlieren Zeilenumbrüche (keine gefälschten Zeilen in der Benachrichtigung). +- Englische Installation: Der Installer legte Seiten, Bereiche und Menüs unter `en` an, gelesen wird `de` – jede Seite antwortete 404. Jetzt immer `de`, Hauptsprache an der Website (ADR 111). +- Geplante Veröffentlichung: Termine aus der Zeit vor ADR 116 (ohne festgehaltene Fassung) veröffentlichten den neuesten Entwurf, auch einen ungeprüften. Solche Termine verfallen jetzt mit Protokolleintrag. +- Seite verschieben: auf `/admin`, `/media` usw. gesperrt wie beim Anlegen; die Version wird im Update selbst geprüft (zwei gleichzeitige Verschiebungen überschrieben sich ohne `StaleWrite`). +- Inhaltspaket: Export prüft `close()`; Import verlangt alle Mediendateien laut Manifest und prüft die entpackten Bytes; Arbeitsordner wird bei Fehlern weggeräumt; das Medienabbild wird nach dem Import ganz geleert (gleiche Kennung mit neuem Inhalt). +- Updater: fehlgeschlagene Kopien in `public/`/`plugins/` und fehlgeschlagene Sicherungskopien brechen ab; der Rückbau stellt dann auch `public/` wieder her. Fortschritt wird erst nach der Sperre zurückgesetzt. +- Wiederherstellung: Medien, die nicht ankommen, lassen sie scheitern statt still weniger zu zählen. `cms:restore` lässt eine vorher eingeschaltete Wartung an. +- Editorvorschau beachtet die Kopf-/Fußwahl der Seite (eigener Bereich oder keiner). + +**Geprüft:** PHPUnit 713 grün (PHP 8.4; neu u. a. `RestoreCommandTest`), php-cs-fixer, Twig-Lint, `npm test` 41. Nicht geprüft: Browserchecks (`test:editor`, `test:browser`), PHP 8.2, MySQL; der Versionstest beim Verschieben stellt den Wettlauf nur nach (keine zwei Verbindungen). + +**Verworfen bzw. bewusst nicht geändert:** Theme aus Paketen ungeprüft – nur Admins importieren, die ohnehin eigenen Code setzen dürfen. `beforeunload` im Editor – Schließen/Neuladen lässt sich nicht mit einem eigenen Dialog abfangen, und die lokale Sicherung (1.43.0) gibt es schon. + +**Offen (Entscheidung oder größerer Umbau):** Updates ohne Signatur (Archiv und Prüfsumme vom selben Host; Vorschlag ed25519 mit eingebettetem Schlüssel). Zentrale nimmt unbegrenzt anonyme Erstanmeldungen an (Vorschlag: Registrierungscode in `config.php` oder Drosselung). Zentrale markiert einen Auftrag vor der Antwort als abgeholt (Verbindungsabbruch verliert ihn). MySQL-Rückbau lässt neue Tabellen stehen (ADR 128, bekannt). 404-Pfade in der Statistik ohne Obergrenze. Verwaltungspfad aus `cms:admin-path` wird beim Anlegen/Verschieben von Seiten nicht als reserviert geprüft. + +**Nächster Schritt:** Umut entscheidet über Signatur und Zentrale-Registrierung; danach Release. + ## Codex als Zweitprüfer (11.11.2026, noch nicht committet) **Anlass:** Umut: Codex-CLI wie bei Domira als Bugprüfer einrichten, ab und zu mitlaufen lassen. diff --git a/package-lock.json b/package-lock.json index 4d5c6df..0a36e42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1125,9 +1125,9 @@ "license": "BSD-3-Clause" }, "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.22.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.1.tgz", - "integrity": "sha512-oyL6OPYme/CmiFvNuGzeoxCJ4nOrZE2O1FwM9MWM1AsGri6nLXB2pg+lNA8aLeXMSav0J6eIVS1j6vUPzUtK9g==", + "version": "8.23.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.1.tgz", + "integrity": "sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA==", "dev": true, "license": "MIT", "engines": { @@ -1338,9 +1338,9 @@ } }, "node_modules/ws": { - "version": "7.5.13", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.13.tgz", - "integrity": "sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==", + "version": "7.5.14", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.14.tgz", + "integrity": "sha512-u9Oi2nQ8SZnTUAf6spLLKF5TyqoG3Nbbrd4ai6Sjo4P24bycDewhQqtNMIg4bFpnpH/TD4qk4IuAVhT0HIIqug==", "dev": true, "license": "MIT", "engines": { diff --git a/src/Command/RestoreCommand.php b/src/Command/RestoreCommand.php index f26c73e..8f93e2d 100644 --- a/src/Command/RestoreCommand.php +++ b/src/Command/RestoreCommand.php @@ -45,15 +45,21 @@ final class RestoreCommand extends Command } // The site says "come back later" while the database is being replaced. + // A maintenance state that was already on (by hand, or an unfinished update) stays on. + $wasOn = $this->updater->inMaintenance(); $this->updater->maintenance(true); $result = $this->backup->restore($name, (bool) $input->getOption('force')); foreach ($result['steps'] as $step) { $io->writeln(sprintf('%s %s: %s', $step['ok'] ? ' ok ' : ' FEHLER', $step['step'], $step['detail'])); } - $this->updater->maintenance(false); + if (!$wasOn) { + $this->updater->maintenance(false); + } else { + $io->note('Der Wartungszustand war schon vorher an und bleibt an.'); + } if (!$result['ok']) { - $io->error('Die Wiederherstellung ist nicht gelaufen. Die Installation ist unverändert.'); + $io->error('Die Wiederherstellung ist nicht vollständig gelaufen. Welcher Schritt scheiterte und was schon geändert ist, steht oben.'); return Command::FAILURE; } diff --git a/src/Content/FormRepository.php b/src/Content/FormRepository.php index 01d6e39..f2d9e78 100644 --- a/src/Content/FormRepository.php +++ b/src/Content/FormRepository.php @@ -46,6 +46,14 @@ final class FormRepository /** A human needs longer than this to fill in a form; anything faster is a script. */ public const MIN_SECONDS = 3; public const MAX_SECONDS = 86400; + /** + * Der Honigtopf trägt einen Namen, den kein Feld haben kann (Bindestrich). Früher hieß er + * „website“ - und der Editor macht aus der Beschriftung „Website“ genau diesen Feldnamen. Wer + * dann eine Adresse eintrug, galt als Bot, und die Anfrage verschwand still. + */ + public const HONEYPOT = 'homepage-url'; + /** Diese Namen schickt das Formular selbst mit; ein Feld gleichen Namens überschriebe sie. */ + public const RESERVED_NAMES = ['page', 'block', 'language', 'issued']; /** * Gespeicherte Anfragen je Formular und insgesamt je Stunde (ADR 116). Darüber hinaus wird * nichts mehr gespeichert und nichts verschickt - eine Flut füllt sonst Postfach und @@ -180,6 +188,9 @@ final class FormRepository if (1 !== preg_match('/^[a-z][a-z0-9_]{0,31}$/D', $name) || isset($names[$name])) { throw new InvalidForm('Jedes Feld braucht einen eindeutigen technischen Namen aus Kleinbuchstaben, Ziffern und Unterstrich.'); } + if (in_array($name, self::RESERVED_NAMES, true)) { + throw new InvalidForm(sprintf('Der technische Name „%s“ ist für das Formular selbst reserviert. Bitte einen anderen wählen, etwa „%s_feld“.', $name, $name)); + } $names[$name] = true; $type = (string) ($field['type'] ?? ''); if (!isset(self::TYPES[$type])) { @@ -624,6 +635,11 @@ final class FormRepository continue; } $value = is_string($raw) ? trim($raw) : ''; + // Ein einzeiliges Feld bleibt einzeilig: ein Zeilenumbruch darin fälschte sonst eigene + // Zeilen („E-Mail: …“) in der Benachrichtigung. + if ('textarea' !== $field['type']) { + $value = trim((string) preg_replace('/\s*[\r\n]+\s*/', ' ', $value)); + } $limit = 'textarea' === $field['type'] ? 5000 : 200; if (mb_strlen($value) > $limit) { $errors[$name] = $t('Bitte kürze die Eingabe auf höchstens %d Zeichen.', $limit); diff --git a/src/Content/MediaMirror.php b/src/Content/MediaMirror.php index d435d9a..924578b 100644 --- a/src/Content/MediaMirror.php +++ b/src/Content/MediaMirror.php @@ -89,4 +89,33 @@ final class MediaMirror return $removed; } + + /** + * Leert das Abbild ganz - nach dem Import eines Website-Pakets. prune() genügt dort nicht: + * bringt das Paket eine Variante unter derselben Kennung mit anderem Inhalt, bliebe die alte + * Kopie (oder der harte Verweis auf die ersetzte Datei) stehen. Das Abbild füllt sich beim + * nächsten Abruf von selbst wieder. + * + * @return int entfernte Dateien + */ + public function clear(): int + { + if (!$this->enabled() || !is_dir($this->directory)) { + return 0; + } + $removed = 0; + foreach (scandir($this->directory) ?: [] as $id) { + if (1 !== preg_match('/^[a-f0-9]{32}$/D', $id) || !is_dir($this->directory.'/'.$id)) { + continue; + } + foreach (scandir($this->directory.'/'.$id) ?: [] as $name) { + if ('.' !== $name && '..' !== $name) { + $removed += (int) @unlink($this->directory.'/'.$id.'/'.$name); + } + } + @rmdir($this->directory.'/'.$id); + } + + return $removed; + } } diff --git a/src/Content/PageRepository.php b/src/Content/PageRepository.php index 702d3fe..bb5d5d7 100644 --- a/src/Content/PageRepository.php +++ b/src/Content/PageRepository.php @@ -121,6 +121,10 @@ final class PageRepository throw new InvalidPage('Eine Seite kann nicht unter eine ihrer eigenen Unterseiten verschoben werden.'); } $newPath = $parent['path'].'/'.$slug; + } elseif (in_array($slug, self::RESERVED_SLUGS, true)) { + // Wie beim Anlegen: unter /admin oder /media antwortet das CMS selbst, die Seite + // wäre nicht mehr erreichbar - und ihre Weiterleitung führte in die Verwaltung. + throw new InvalidPage('Diese Adresse ist für das CMS reserviert.'); } elseif (in_array($slug, $this->languageCodes(), true)) { throw new InvalidPage(sprintf('Unter /%s erscheint die Website in einer weiteren Sprache. Wähle eine andere Adresse.', $slug)); } @@ -146,12 +150,17 @@ final class PageRepository } unset($depth); + // Zuerst die Version beanspruchen: Die Prüfung oben sperrt die Zeile nicht, zwei + // gleichzeitige Verschiebungen lasen sonst beide dieselbe Version, und die zweite + // überschrieb die erste ohne StaleWrite. Die Transaktion nimmt alles zurück. + if (1 !== $this->db->executeStatement('UPDATE page SET slug = ?, parent_id = ?, version = version + 1 WHERE id = ? AND version = ?', [$slug, $parentId, $pageId, $expectedVersion])) { + throw new StaleWrite('Die Seite wurde inzwischen geändert. Lade die Übersicht neu.'); + } foreach ($affected as $row) { $moved = $newPath.substr($row['path'], strlen($page['path'])); $this->db->executeStatement('UPDATE page SET path = ? WHERE id = ?', [$moved, $row['id']]); $redirects->remember($row['path'], $moved); } - $this->db->executeStatement('UPDATE page SET slug = ?, parent_id = ?, version = version + 1 WHERE id = ?', [$slug, $parentId, $pageId]); // Die Übersetzungen hängen an derselben Hierarchie: unter einer verschobenen Seite // ändern sich auch die Adressen der anderen Sprachen. if ($this->multilingual()) { @@ -305,12 +314,19 @@ final class PageRepository public function publishDue(): array { $published = []; + $now = gmdate('Y-m-d H:i:s'); + // Planungen aus der Zeit vor ADR 116 tragen keine Fassung. Früher ging für sie der jeweils + // neueste Entwurf online - auch einer, den nach dem Update jemand ohne Recht zum + // Veröffentlichen gespeichert hatte. Solche Termine verfallen jetzt; die Seite bleibt + // Entwurf und wird neu geplant, wer darf. + foreach ($this->db->fetchAllAssociative('SELECT id, path FROM page WHERE website_id = ? AND publish_at IS NOT NULL AND publish_at <= ? AND publish_revision_id IS NULL', ['default', $now]) as $row) { + $this->db->executeStatement('UPDATE page SET publish_at = NULL, version = version + 1 WHERE id = ? AND publish_revision_id IS NULL', [$row['id']]); + error_log(sprintf('Geplante Veröffentlichung von /%s verworfen: Der Termin stammt aus der Zeit vor ADR 116 und hält keine Fassung fest. Bitte neu planen.', $row['path'])); + } foreach ($this->db->fetchAllAssociative( - // Online geht die Fassung, die beim Planen vorlag (ADR 116) - nicht ein Entwurf, den - // danach jemand ohne Recht zum Veröffentlichen gespeichert hat. Planungen aus der Zeit - // vor dieser Spalte tragen keine Fassung; für sie bleibt es beim Entwurf. - 'SELECT id, path, COALESCE(publish_revision_id, draft_revision_id) AS revision, version FROM page WHERE website_id = ? AND deleted_at IS NULL AND publish_at IS NOT NULL AND publish_at <= ? AND COALESCE(publish_revision_id, draft_revision_id) IS NOT NULL AND (published_revision_id IS NULL OR published_revision_id <> COALESCE(publish_revision_id, draft_revision_id))', - ['default', gmdate('Y-m-d H:i:s')], + // Online geht die Fassung, die beim Planen vorlag (ADR 116). + 'SELECT id, path, publish_revision_id AS revision, version FROM page WHERE website_id = ? AND deleted_at IS NULL AND publish_at IS NOT NULL AND publish_at <= ? AND publish_revision_id IS NOT NULL AND (published_revision_id IS NULL OR published_revision_id <> publish_revision_id)', + ['default', $now], ) as $row) { try { $this->publish($row['id'], $row['revision'], (int) $row['version']); diff --git a/src/Controller/EditorController.php b/src/Controller/EditorController.php index 9870b90..01525cb 100644 --- a/src/Controller/EditorController.php +++ b/src/Controller/EditorController.php @@ -511,7 +511,14 @@ final class EditorController extends AbstractController $theme = $this->theme->load(); $areas = []; foreach (['header', 'footer'] as $kind) { - $area = $this->partials->findByKind($kind); + // Wie auf der Website: die Seite kann einen eigenen Bereich oder keinen wählen. + // Vorher zeigte die Vorschau immer die Standardbereiche. + $choice = $page[$kind.'_area'] ?? null; + if ('none' === $choice) { + continue; + } + $area = is_string($choice) && '' !== $choice ? $this->partials->findByKind($kind, $choice) : null; + $area ??= $this->partials->findByKind($kind); if (null !== $area) { $areas[$kind] = $localise($area['document']); } diff --git a/src/Controller/FormController.php b/src/Controller/FormController.php index c74f8e7..38e79ad 100644 --- a/src/Controller/FormController.php +++ b/src/Controller/FormController.php @@ -56,7 +56,13 @@ final class FormController extends AbstractController // Three quiet checks before the real validation. A caught bot is answered like a success // so it learns nothing, but nothing is stored and nothing is sent. - $silentlyDropped = '' !== trim($request->request->getString('website')) + $trap = trim($request->request->getString(FormRepository::HONEYPOT)); + // Seiten aus einem Zwischenspeicher tragen noch den alten Namen. Den gilt er nur, wenn das + // Formular kein eigenes Feld so nennt. + if ('' === $trap && !in_array('website', array_column($form['fields'], 'name'), true)) { + $trap = trim($request->request->getString('website')); + } + $silentlyDropped = '' !== $trap || !$this->timingIsPlausible($request, $slug) || $this->forms->rateLimited($senderHash) // Die vierte, freiwillige Pruefung. Sie antwortet wie die drei anderen still mit diff --git a/src/Ops/ArchiveUpdate.php b/src/Ops/ArchiveUpdate.php index b64319f..9434bb5 100644 --- a/src/Ops/ArchiveUpdate.php +++ b/src/Ops/ArchiveUpdate.php @@ -169,14 +169,14 @@ final class ArchiveUpdate return ['ok' => true, 'steps' => $schritte]; } - $this->phase('sichern', 'Datenbank und Medien werden gesichert …', ['laeuft' => true, 'von' => $this->updater->version(), 'auf' => $ziel, 'seit' => gmdate('c')], true); - $lock = $this->updater->lock(); if (null === $lock) { $melden($schritte, 'Sperre', false, 'Ein anderes Update läuft gerade (var/update.lock). Bitte warten.'); return ['ok' => false, 'steps' => $schritte]; } + // Erst mit der Sperre: ein zweiter Aufruf setzte sonst den Fortschritt des laufenden zurück. + $this->phase('sichern', 'Datenbank und Medien werden gesichert …', ['laeuft' => true, 'von' => $this->updater->version(), 'auf' => $ziel, 'seit' => gmdate('c')], true); try { return $this->apply($schritte, $melden, $ziel, $neueste); } finally { @@ -285,6 +285,14 @@ final class ArchiveUpdate @rename($alt.'/'.$eintrag, $this->root.'/'.$eintrag); } } + // Auch public/ und plugins/ zurück, soweit sie schon angefasst waren - sonst bliebe + // der alte Code mit halb neuen Dateien in public/ stehen. + foreach ($this->publicNeu as $relativ) { + @unlink($this->root.'/'.$relativ); + } + foreach ($this->publicAlt as $relativ) { + @copy($this->publicSicherung.'/'.$relativ, $this->root.'/'.$relativ); + } $melden($schritte, 'Dateien ersetzen', false, $fehler->getMessage().' Der alte Stand wurde zurückgeschoben.'); $this->updater->maintenance(false); @@ -568,7 +576,9 @@ final class ArchiveUpdate continue; } if (is_dir($quelle)) { - @mkdir($ziel, 0o775, true); + if (!is_dir($ziel) && !@mkdir($ziel, 0o775, true)) { + throw new \RuntimeException($ziel.' ließ sich nicht anlegen. Schreibrechte prüfen.'); + } $this->mergePublic($quelle, $ziel); continue; @@ -579,7 +589,10 @@ final class ArchiveUpdate continue; } - @copy($quelle, $ziel); + // Ein stilles Scheitern hinterließ neuen Code mit altem public/ und meldete Erfolg. + if (!@copy($quelle, $ziel)) { + throw new \RuntimeException(ltrim(substr($ziel, strlen($this->root)), '/').' ließ sich nicht ersetzen. Schreibrechte und freien Speicherplatz prüfen.'); + } } } @@ -597,9 +610,11 @@ final class ArchiveUpdate } $kopie = $this->publicSicherung.'/'.$relativ; @mkdir(dirname($kopie), 0o775, true); - if (@copy($ziel, $kopie)) { - $this->publicAlt[] = $relativ; + // Ohne Kopie keine Überschreibung: ein Zurückschalten bekäme die Datei sonst nicht zurück. + if (!@copy($ziel, $kopie)) { + throw new \RuntimeException($relativ.' ließ sich nicht sichern. Freien Speicherplatz prüfen.'); } + $this->publicAlt[] = $relativ; } /** diff --git a/src/Ops/Backup.php b/src/Ops/Backup.php index 90baf4e..f6a1d1a 100644 --- a/src/Ops/Backup.php +++ b/src/Ops/Backup.php @@ -234,8 +234,14 @@ final class Backup // Media are added, never deleted: files uploaded after the backup would otherwise be lost // by the very operation that is meant to prevent loss. - $restored = $this->restoreMedia($path.'/medien'); - $step($steps, 'Medien ergänzen', true, sprintf('%d Datei(en) zurückgeschrieben. Neuere Dateien bleiben erhalten.', $restored)); + [$restored, $missing] = $this->restoreMedia($path.'/medien'); + // Eine Datei, die nicht ankam, ist ein Fehler, kein stilles Weniger: die Datenbank + // verweist auf sie. + if (!$step($steps, 'Medien ergänzen', [] === $missing, [] === $missing + ? sprintf('%d Datei(en) zurückgeschrieben. Neuere Dateien bleiben erhalten.', $restored) + : sprintf('%d Datei(en) zurückgeschrieben, %d nicht (%s). Die Datenbank ist bereits zurückgeschrieben. Schreibrechte und Speicherplatz für den Medienordner prüfen und die Wiederherstellung wiederholen.', $restored, \count($missing), implode(', ', \array_slice($missing, 0, 5)).(\count($missing) > 5 ? ', …' : '')))) { + return ['steps' => $steps, 'ok' => false]; + } // Eine Sicherung aus einer älteren Fassung bringt deren Datenbankschema mit. Der Code hier // ist neuer und erwartet Spalten, die es dann noch nicht gibt - das muss dastehen, sonst // sucht man die 500er an der falschen Stelle. @@ -367,20 +373,30 @@ final class Backup return ['count' => $count, 'bytes' => $bytes]; } - private function restoreMedia(string $source): int + /** @return array{int, list} zurückgeschriebene Dateien und die Namen derer, die nicht ankamen */ + private function restoreMedia(string $source): array { if (!is_dir($source)) { - return 0; + return [0, []]; } @mkdir($this->mediaDirectory, 0o775, true); $count = 0; + $missing = []; foreach (glob($source.'/*') ?: [] as $file) { - if (is_file($file) && @copy($file, $this->mediaDirectory.'/'.basename($file))) { + if (!is_file($file)) { + continue; + } + $target = $this->mediaDirectory.'/'.basename($file); + $copied = @copy($file, $target); + clearstatcache(true, $target); + if ($copied && filesize($file) === @filesize($target)) { ++$count; + } else { + $missing[] = basename($file); } } - return $count; + return [$count, $missing]; } private function manifest(string $path): ?array diff --git a/src/Ops/Installation.php b/src/Ops/Installation.php index 0611041..4f9d4b5 100644 --- a/src/Ops/Installation.php +++ b/src/Ops/Installation.php @@ -298,7 +298,12 @@ final class Installation } $created = []; - $this->db->transactional(function () use ($name, $locale, &$created): void { + // Die Hauptsprache steht an der Website (ADR 111); Seiten, Bereiche und Menüs der + // Hauptsprache liegen immer unter dem Schlüssel „de“, und so liest sie die öffentliche + // Ausgabe. Vorher bekamen sie hier „en“ - eine englische Installation lieferte dann für + // jede Seite, auch die Startseite, eine 404. + $storage = 'de'; + $this->db->transactional(function () use ($name, $locale, $storage, &$created): void { if (!$this->db->fetchOne('SELECT id FROM website WHERE id = ?', ['default'])) { $this->db->insert('website', [ 'id' => 'default', @@ -310,27 +315,27 @@ final class Installation $this->db->update('website', ['name' => mb_substr($name, 0, 120), 'default_locale' => $locale], ['id' => 'default']); } - if (null === $this->pages->findPublished('home', $locale)) { - $id = $this->pages->createPage('home', null, 'page', DemoContent::starterPage($name), $locale); + if (null === $this->pages->findPublished('home', $storage)) { + $id = $this->pages->createPage('home', null, 'page', DemoContent::starterPage($name), $storage); $page = $this->pages->findForEditor($id); $this->pages->publish($id, $page['draft_revision_id'], $page['version']); $created[] = 'Startseite'; } foreach (DemoContent::LEGAL as $slug => $label) { - if (null === $this->pages->findPublished($slug, $locale)) { - $id = $this->pages->createPage($slug, null, 'page', DemoContent::legalPage($slug), $locale); + if (null === $this->pages->findPublished($slug, $storage)) { + $id = $this->pages->createPage($slug, null, 'page', DemoContent::legalPage($slug), $storage); $page = $this->pages->findForEditor($id); $this->pages->publish($id, $page['draft_revision_id'], $page['version']); $created[] = $label; } } foreach (DemoContent::starterAreas($name) as $kind => $area) { - if (null === $this->partials->findByKind($kind, 'default', $locale)) { - $this->partials->create($kind, 'default', $area['name'], $area['document'], $locale); + if (null === $this->partials->findByKind($kind, 'default', $storage)) { + $this->partials->create($kind, 'default', $area['name'], $area['document'], $storage); $created[] = $area['name']; } } - $this->createMenu($locale, $created); + $this->createMenu($storage, $created); }); $this->writeEnvironment(['SITE_ORIGIN' => $origin]); diff --git a/src/Ops/SitePackage.php b/src/Ops/SitePackage.php index 4363381..17c43b3 100644 --- a/src/Ops/SitePackage.php +++ b/src/Ops/SitePackage.php @@ -121,7 +121,12 @@ final class SitePackage foreach ($files as $name) { $zip->addFile($this->mediaDirectory.'/'.$name, self::MEDIA.$name); } - $zip->close(); + // Erst close() schreibt das Archiv. Scheitert es (Platte voll, Datei nicht lesbar), gäbe es + // sonst ein Paket ohne Medien, dessen Import die Bilder der Zielwebsite löscht. + if (true !== @$zip->close()) { + @unlink($target); + throw new InvalidPage('Das Paket ließ sich nicht vollständig schreiben. Freien Speicherplatz und Leserechte auf var/media prüfen.'); + } return $target; } @@ -186,6 +191,7 @@ final class SitePackage try { $manifest = $this->checkedManifest($zip); $step('Paket prüfen', true, sprintf('„%s“ vom %s, Fassung %s, %d Seite(n), %d Mediendatei(en).', $manifest['website'], substr((string) $manifest['erstellt'], 0, 10), $manifest['fassung'], (int) ($manifest['inhalt']['page'] ?? 0), (int) $manifest['medien'])); + $this->checkedMedia($zip, $manifest); $tables = $this->checkedData($zip, $manifest); $this->validateDocuments($tables); $step('Inhalte prüfen', true, 'Alle Tabellen bekannt, alle Seiten- und Bereichsdokumente gültig.'); @@ -234,7 +240,8 @@ final class SitePackage } $step('Medien ersetzen', true, sprintf('%d Datei(en) übernommen.', $moved)); // Was der Webserver noch aus dem Abbild lieferte, gehört zur Website von vorher. - $this->mirror?->prune(); + // Auch Varianten mit gleicher Kennung, aber neuem Inhalt - daher ganz leeren. + $this->mirror?->clear(); } finally { if (!$inWartung) { $this->updater->maintenance(false); @@ -305,6 +312,28 @@ final class SitePackage return $manifest; } + /** + * Das Paket muss jede Mediendatei enthalten, die sein Manifest zählt. Nach dem Import liegt im + * Medienordner nur noch, was das Paket brachte - ein Paket mit fehlenden Dateien hinterließe + * eine Website, deren Seiten auf gelöschte Bilder verweisen. + * + * @throws InvalidPage + */ + private function checkedMedia(\ZipArchive $zip, array $manifest): void + { + $found = 0; + for ($i = 0; $i < $zip->numFiles; ++$i) { + $name = (string) $zip->getNameIndex($i); + if (str_starts_with($name, self::MEDIA) && 1 === preg_match(self::MEDIA_NAME, substr($name, \strlen(self::MEDIA)))) { + ++$found; + } + } + $expected = $manifest['medien'] ?? null; + if (!\is_int($expected) || $expected !== $found) { + throw new InvalidPage(sprintf('Im Paket fehlen Mediendateien (%d von %s). Es ist unvollständig und wird nicht eingespielt.', $found, \is_int($expected) ? (string) $expected : '?')); + } + } + /** * @return array>> * @@ -434,6 +463,19 @@ final class SitePackage if (!@mkdir($target, 0o775, true)) { throw new \RuntimeException('Ein Arbeitsordner unter var/pakete ließ sich nicht anlegen.'); } + try { + $this->extractMediaInto($zip, $target); + } catch (\Throwable $e) { + // Der Aufrufer kennt den Ordner noch nicht und könnte ihn nicht wegräumen. + $this->remove($target); + throw $e; + } + + return $target; + } + + private function extractMediaInto(\ZipArchive $zip, string $target): void + { for ($i = 0; $i < $zip->numFiles; ++$i) { $name = (string) $zip->getNameIndex($i); $base = substr($name, \strlen(self::MEDIA)); @@ -446,12 +488,15 @@ final class SitePackage if (false === $stream || false === $out) { throw new \RuntimeException(sprintf('%s ließ sich nicht entpacken.', $base)); } - stream_copy_to_stream($stream, $out, self::MAX_FILE_BYTES); + $copied = stream_copy_to_stream($stream, $out, self::MAX_FILE_BYTES); fclose($stream); - fclose($out); + $closed = fclose($out); + // Bei voller Platte kommt eine verkürzte Datei an; replaceMedia vergleicht nur noch mit ihr. + $expected = (int) ($zip->statIndex($i)['size'] ?? -1); + if (!$closed || $copied !== $expected) { + throw new \RuntimeException(sprintf('%s ließ sich nicht vollständig entpacken. Freien Speicherplatz prüfen.', $base)); + } } - - return $target; } /** diff --git a/src/Ops/Updater.php b/src/Ops/Updater.php index 2b5846a..7304bcf 100644 --- a/src/Ops/Updater.php +++ b/src/Ops/Updater.php @@ -376,6 +376,11 @@ final class Updater return array_slice(array_reverse($entries), 0, $lines); } + public function inMaintenance(): bool + { + return is_file($this->root.'/'.self::MAINTENANCE_FILE); + } + public function maintenance(bool $on): void { $file = $this->root.'/'.self::MAINTENANCE_FILE; diff --git a/templates/blocks/form.html.twig b/templates/blocks/form.html.twig index 02b9b40..5dd1250 100644 --- a/templates/blocks/form.html.twig +++ b/templates/blocks/form.html.twig @@ -15,7 +15,7 @@ {# Bait for automated senders. Hidden from view, from assistive technology and from tab order. #} - + {% if errors._form is defined %} diff --git a/tests/ArchiveUpdateTest.php b/tests/ArchiveUpdateTest.php index 2381e20..62b16b1 100644 --- a/tests/ArchiveUpdateTest.php +++ b/tests/ArchiveUpdateTest.php @@ -156,6 +156,26 @@ final class ArchiveUpdateTest extends TestCase self::assertFileDoesNotExist($this->root.'/'.Updater::MAINTENANCE_FILE, 'Die Website darf davon nichts merken.'); } + public function testAFileInPublicThatCannotBeReplacedSwitchesEverythingBack(): void + { + // public/index.php lässt sich nicht überschreiben (hier: ein Ordner an ihrer Stelle; live + // fehlende Schreibrechte oder volle Platte). Vorher meldete das Update trotzdem Erfolg und + // ließ neuen Code mit altem public/ stehen; ein Fehler danach brachte public/ nicht zurück. + unlink($this->root.'/public/index.php'); + mkdir($this->root.'/public/index.php'); + $this->releases->release(self::BASE, self::API, '1.1.0', $this->archive('1.1.0')); + + $ergebnis = $this->updater()->run(); + + self::assertFalse($ergebnis['ok']); + self::assertSame('Dateien ersetzen', $this->firstFailed($ergebnis)['step'], $this->explain($ergebnis)); + self::assertSame('1.0.0', trim((string) file_get_contents($this->root.'/VERSION'))); + self::assertFileExists($this->root.'/src/Alt.php'); + self::assertSame('body{color:alt}', file_get_contents($this->root.'/public/assets/site.css'), 'Schon ersetzte Dateien in public/ kommen zurück.'); + self::assertNull($this->updater()->pending()); + self::assertFileDoesNotExist($this->root.'/'.Updater::MAINTENANCE_FILE); + } + public function testAnIncompleteArchiveIsRefusedBeforeTheSiteGoesIntoMaintenance(): void { // Ein Archiv ohne vendor/ ist auf einem Hosting ohne Composer wertlos - das muss auffallen, diff --git a/tests/BackupTest.php b/tests/BackupTest.php index a6ef906..50ed6d5 100644 --- a/tests/BackupTest.php +++ b/tests/BackupTest.php @@ -143,6 +143,25 @@ final class BackupTest extends TestCase self::assertFileExists($this->root.'/var/media/bild-480.webp'); } + public function testAMediaFileThatCannotBeWrittenBackFailsTheRestore(): void + { + $backup = $this->backup->create('Test'); + // Die Datei lässt sich nicht zurückschreiben (hier: ein Ordner an ihrer Stelle; live + // fehlende Schreibrechte). Vorher zählte die Wiederherstellung sie still nicht mit und + // meldete Erfolg, obwohl die Datenbank auf das Bild verweist. + unlink($this->root.'/var/media/bild-480.webp'); + mkdir($this->root.'/var/media/bild-480.webp'); + + $result = $this->backup->restore($backup['name']); + rmdir($this->root.'/var/media/bild-480.webp'); + + self::assertFalse($result['ok']); + $media = array_values(array_filter($result['steps'], static fn (array $s): bool => 'Medien ergänzen' === $s['step']))[0] ?? null; + self::assertNotNull($media); + self::assertFalse($media['ok']); + self::assertStringContainsString('bild-480.webp', $media['detail']); + } + public function testATamperedBackupIsNotRestored(): void { $backup = $this->backup->create('Test'); diff --git a/tests/CmsTest.php b/tests/CmsTest.php index d542c9a..7dc991f 100644 --- a/tests/CmsTest.php +++ b/tests/CmsTest.php @@ -2991,6 +2991,21 @@ final class CmsTest extends TestCase self::assertSame($child, $this->db->fetchOne('SELECT parent_id FROM page WHERE id = ?', [$grandchild])); } + public function testAMoveThatLostTheRaceForTheVersionChangesNothing(): void + { + // Zwei gleichzeitige Verschiebungen lesen dieselbe Version. Nachgestellt: die erste ist + // schon durch, die zweite kommt mit der alten Version und darf nicht überschreiben. + $page = $this->publishedPage('beratung', 'Beratung'); + $version = $this->pages->findForEditor($page)['version']; + $this->db->executeStatement('UPDATE page SET version = version + 1 WHERE id = ?', [$page]); + try { + $this->pages->movePage($page, 'anders', null, $version, $this->redirects); + self::fail('Expected a stale write.'); + } catch (StaleWrite) { + } + self::assertSame('beratung', $this->db->fetchOne('SELECT path FROM page WHERE id = ?', [$page])); + } + public function testMoveRefusesCyclesCollisionsAndTheHomePage(): void { $parent = $this->publishedPage('leistungen', 'Leistungen'); @@ -3002,6 +3017,9 @@ final class CmsTest extends TestCase 'into itself' => [$parent, 'leistungen', $parent], 'onto a taken address' => [$other, 'leistungen', null], 'with a slug that is no slug' => [$other, 'mit leerzeichen', null], + // Beim Anlegen schon gesperrt, beim Verschieben fehlte die Prüfung. + 'onto the administration' => [$other, 'admin', null], + 'onto the media address' => [$other, 'media', null], ]; foreach ($cases as $name => [$page, $slug, $target]) { try { @@ -3869,6 +3887,12 @@ display: flex', '#b1{display:flex;color:red}']; // sonst lieferte der Webserver weiter aus, was die Anwendung nicht mehr kennt. $mirror = new \App\Content\MediaMirror($abbild, $this->path.'-media'); self::assertSame(0, $mirror->prune()); + // Bringt ein Paket dieselbe Kennung mit anderem Inhalt, findet prune() nichts; deshalb + // leert der Import das Abbild ganz, und es füllt sich beim nächsten Abruf wieder. + self::assertSame(1, $mirror->clear()); + self::assertDirectoryDoesNotExist($abbild.'/'.$item['id']); + $mirror->publish($item['id'], 480, $quelle); + self::assertFileEquals($quelle, $ziel); unlink($quelle); file_put_contents($abbild.'/'.$item['id'].'/fremd.txt', 'gehört nicht hierher'); self::assertSame(2, $mirror->prune()); diff --git a/tests/EditorSecurityTest.php b/tests/EditorSecurityTest.php index 28659b1..b9dc473 100644 --- a/tests/EditorSecurityTest.php +++ b/tests/EditorSecurityTest.php @@ -227,6 +227,23 @@ final class EditorSecurityTest extends WebTestCase } } + public function testThePreviewHonoursThePagesChoiceOfHeader(): void + { + // Eine Landingpage ohne Kopf: die Website zeigt keinen, die Vorschau zeigte trotzdem den Standardkopf. + $client = $this->login(); + $data = $this->data($client); + $preview = function () use ($client, $data): string { + $this->post($client, 'preview', ['document' => $data['document'], 'expectedVersion' => $data['version']], $data['csrfToken']); + self::assertResponseIsSuccessful(); + + return (string) $client->getResponse()->getContent(); + }; + self::assertStringContainsString('area-header', $preview()); + $this->db->executeStatement("UPDATE page SET header_area = 'none' WHERE id = ?", ['p1']); + self::assertStringNotContainsString('area-header', $preview()); + self::assertStringContainsString('area-footer', $preview(), 'Der Fuß bleibt, wo nur der Kopf abgewählt ist.'); + } + private function data(KernelBrowser $client): array { $client->request('GET', '/admin/api/pages/p1'); @@ -418,6 +435,24 @@ final class EditorSecurityTest extends WebTestCase self::assertNull($this->db->fetchOne('SELECT publish_revision_id FROM page WHERE id = ?', [$id])); } + public function testAScheduleFromBeforeTheRevisionColumnDoesNotPublishTheLatestDraft(): void + { + // Ein Termin aus der Zeit vor ADR 116: publish_at gesetzt, keine Fassung festgehalten. + // Danach speichert ein Redakteur einen ungeprüften Entwurf - der ging früher zum Termin online. + $pages = new PageRepository($this->db, new DocumentValidator(), new SiteSettings($this->db, new MediaLibrary($this->db, $this->path.'-media'))); + $id = $pages->createPage('alt-termin', null, 'page', DemoContent::starter('Ungeprüft')); + $this->db->executeStatement('UPDATE page SET publish_at = ? WHERE id = ?', ['2026-01-01 08:00:00', $id]); + + $log = ini_set('error_log', \PHP_OS_FAMILY === 'Windows' ? 'NUL' : '/dev/null'); + try { + self::assertSame([], $pages->publishDue()); + } finally { + ini_set('error_log', (string) $log); + } + self::assertNull($this->db->fetchOne('SELECT published_revision_id FROM page WHERE id = ?', [$id])); + self::assertNull($this->db->fetchOne('SELECT publish_at FROM page WHERE id = ?', [$id]), 'Der Termin verfällt, statt ewig fällig zu bleiben.'); + } + public function testAdministratorsDeleteAPageWithAllRevisionsOnlyWithACsrfToken(): void { $client = $this->login('admin'); @@ -560,7 +595,7 @@ final class EditorSecurityTest extends WebTestCase private function validBody(string $issued): array { return [ - 'page' => 'home', 'block' => 'formblock', 'website' => '', + 'page' => 'home', 'block' => 'formblock', FormRepository::HONEYPOT => '', 'issued' => $issued, 'issuedSignature' => FormRepository::stamp('kontakt', (int) $issued, 'isolated-test-secret'), 'name' => 'Umut', 'email' => 'umut@example.com', 'thema' => 'Beratung', 'nachricht' => 'Bitte um Rückruf.', 'datenschutz' => 'ja', @@ -578,7 +613,7 @@ final class EditorSecurityTest extends WebTestCase self::assertStringContainsString('', $html); self::assertStringContainsString('Ich willige ein.', $html); // The honeypot exists but is kept out of the tab order and away from assistive technology. - self::assertStringContainsString('name="website"', $html); + self::assertStringContainsString('name="'.FormRepository::HONEYPOT.'"', $html); self::assertStringContainsString('tabindex="-1"', $html); self::assertStringNotContainsString('getResponse()->getContent()); @@ -674,7 +709,9 @@ final class EditorSecurityTest extends WebTestCase public static function droppedSubmissions(): iterable { $sign = static fn (string $issued): string => FormRepository::stamp('kontakt', (int) $issued, 'isolated-test-secret'); - yield 'honeypot filled' => [static fn (array $body): array => [...$body, 'website' => 'https://spam.example']]; + yield 'honeypot filled' => [static fn (array $body): array => [...$body, FormRepository::HONEYPOT => 'https://spam.example']]; + // Eine Seite aus dem Zwischenspeicher trägt noch den alten Namen des Honigtopfs. + yield 'old honeypot filled' => [static fn (array $body): array => [...$body, 'website' => 'https://spam.example']]; yield 'submitted too fast' => [static fn (array $body): array => [...$body, 'issued' => (string) time(), 'issuedSignature' => $sign((string) time())]]; yield 'timestamp forged' => [static fn (array $body): array => [...$body, 'issuedSignature' => 'nicht-signiert']]; yield 'timestamp far in the past' => [static function (array $body) use ($sign): array { @@ -697,6 +734,40 @@ final class EditorSecurityTest extends WebTestCase self::assertSame(0, (int) $this->db->fetchOne('SELECT COUNT(*) FROM form_submission')); } + public function testAFieldNamedWebsiteIsAnsweredNotMistakenForTheHoneypot(): void + { + // Der Editor macht aus der Beschriftung „Website“ den Namen „website“ - so hieß früher der + // Honigtopf, und jede Anfrage mit ausgefüllter Adresse verschwand still. + $forms = new FormRepository($this->db); + $forms->save('kontakt', 'Kontakt', [ + ['name' => 'email', 'type' => 'email', 'label' => 'E-Mail', 'required' => true], + ['name' => 'website', 'type' => 'text', 'label' => 'Website', 'required' => false], + ['name' => 'name', 'type' => 'text', 'label' => 'Name', 'required' => false], + ], ['recipient' => 'info@kant-it.de', 'subject' => 'Anfrage', 'success' => 'Danke.'], 0); + $this->pageWithForm(); + $client = self::createClient(); + + $body = [...$this->validBody((string) (time() - 10)), 'website' => 'https://kunde.example', 'name' => "Max\nE-Mail: chef@firma.example"]; + $client->request('POST', '/formular/kontakt', $body); + self::assertResponseStatusCodeSame(303); + $data = json_decode((string) $this->db->fetchOne('SELECT data FROM form_submission'), true); + self::assertSame('https://kunde.example', $data['website'] ?? null); + // Ein einzeiliges Feld bleibt einzeilig und kann keine Zeile der Benachrichtigung fälschen. + self::assertSame('Max E-Mail: chef@firma.example', $data['name'] ?? null); + } + + public function testNamesTheFormSendsItselfAreRefusedAsFieldNames(): void + { + foreach (FormRepository::RESERVED_NAMES as $name) { + try { + (new FormRepository($this->db))->save('reserviert-'.$name, 'Reserviert', [['name' => $name, 'type' => 'text', 'label' => 'Feld']], ['recipient' => 'info@kant-it.de'], 0); + self::fail($name.' wurde als Feldname angenommen.'); + } catch (InvalidForm $e) { + self::assertStringContainsString('reserviert', $e->getMessage()); + } + } + } + public function testRateLimitStopsTheSixthSubmissionWithinAnHour(): void { $forms = $this->contactForm(); diff --git a/tests/InstallationTest.php b/tests/InstallationTest.php index c09fe68..6e899d1 100644 --- a/tests/InstallationTest.php +++ b/tests/InstallationTest.php @@ -207,6 +207,20 @@ final class InstallationTest extends TestCase yield 'Tippfehler bei der Wiederholung' => ['chefin', 'ein sehr langes passwort', 'ein sehr langes passwortt']; } + public function testAnEnglishInstallationServesItsPages(): void + { + // Englisch stand im Installer zur Wahl, und danach antwortete jede Seite mit 404: die + // Seiten lagen unter „en“, gelesen wird die Hauptsprache unter „de“ (ADR 111). + $this->installation->migrate(); + $this->installation->createSite('Example Ltd', 'https://example.com', 'en'); + + $pages = new PageRepository($this->db, new DocumentValidator(), new SiteSettings($this->db, new MediaLibrary($this->db, $this->root.'/var/media'))); + self::assertNotNull($pages->findPublished('home'), 'Die Startseite einer englischen Installation fehlt.'); + self::assertNotNull($pages->findPublished('impressum')); + self::assertSame('en', $this->db->fetchOne('SELECT default_locale FROM website')); + self::assertSame(['de'], $this->db->fetchFirstColumn('SELECT DISTINCT locale FROM page')); + } + #[DataProvider('badSites')] public function testAWebsiteWithBadInputIsRefused(string $name, string $origin, string $locale): void { diff --git a/tests/RestoreCommandTest.php b/tests/RestoreCommandTest.php new file mode 100644 index 0000000..e28f9e0 --- /dev/null +++ b/tests/RestoreCommandTest.php @@ -0,0 +1,72 @@ +root = str_replace('\\', '/', sys_get_temp_dir()).'/kant-restore-'.bin2hex(random_bytes(6)); + mkdir($this->root.'/var/media', 0o775, true); + file_put_contents($this->root.'/VERSION', "1.0.0\n"); + $this->db = ConnectionFactory::create('sqlite:///'.$this->root.'/var/cms.db'); + TestSchema::build($this->db); + } + + protected function tearDown(): void + { + $this->db->close(); + gc_collect_cycles(); + self::remove($this->root); + } + + public function testAMaintenanceStateThatWasAlreadyOnStaysOn(): void + { + file_put_contents($this->root.'/'.Updater::MAINTENANCE_FILE, "an\n"); + $this->command()->execute(['name' => 'sicherung-gibt-es-nicht'], ['interactive' => false]); + self::assertFileExists($this->root.'/'.Updater::MAINTENANCE_FILE); + } + + public function testAMaintenanceStateTheCommandSwitchedOnIsSwitchedOffAgain(): void + { + $this->command()->execute(['name' => 'sicherung-gibt-es-nicht'], ['interactive' => false]); + self::assertFileDoesNotExist($this->root.'/'.Updater::MAINTENANCE_FILE); + } + + private function command(): CommandTester + { + $runner = new CommandRunner(); + $url = 'sqlite:///'.$this->root.'/var/cms.db'; + + return new CommandTester(new RestoreCommand( + new Backup($this->root, $url, $this->root.'/var/media', $this->db, $runner), + new Updater($this->root, $url, $runner, $this->db), + )); + } + + private static function remove(string $path): void + { + foreach (glob($path.'/{,.}[!.]*', GLOB_BRACE) ?: [] as $entry) { + is_dir($entry) ? self::remove($entry) : @unlink($entry); + } + @rmdir($path); + } +} diff --git a/tests/SitePackageTest.php b/tests/SitePackageTest.php index 5cb154c..759c683 100644 --- a/tests/SitePackageTest.php +++ b/tests/SitePackageTest.php @@ -132,6 +132,9 @@ final class SitePackageTest extends TestCase { yield 'fremde Datei' => [static fn (\ZipArchive $zip) => $zip->addFromString('../../public/hallo.php', ' [static fn (\ZipArchive $zip) => $zip->addFromString('medien/shell.php', ' [static fn (\ZipArchive $zip) => $zip->deleteName(SitePackage::MEDIA.str_repeat('a', 32).'-480.webp'), 'fehlen Mediendateien']; yield 'veränderter Inhalt' => [static function (\ZipArchive $zip): void { $zip->addFromString(SitePackage::DATA, str_replace('Seite der quelle', 'Untergeschoben', (string) $zip->getFromName(SitePackage::DATA))); }, 'Prüfsumme'];