Redirect the other www spelling to SITE_ORIGIN, hold roles to the role help and fix the audit findings

SITE_ORIGIN alone decides whether the site is www or not: CanonicalHostSubscriber
sends the other spelling there with 301, cms:site:origin writes the setting, the
system screen shows it. The roles now match the role help (editor: drafts,
publisher: live content, admin: design, settings, users, system). The installer no
longer reopens on an unreachable database, the session cookie follows ADMIN_PATH,
percent-encoded credentials no longer break the container, consent only accepts
same-site decisions, JSON-LD is HTML-safe, own CSS stays in its block, plus the
editor, updater, download and public-output findings from the full review
(ADR 099, ADR 100).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Fable 5.1 committed 2026-09-15 20:15:20 +02:00
1 parent 45040b2ca6
commit 7eb462ac7b
53 files changed
+1023 -122

No files matched your search

+25
View File
@@ -124,6 +124,31 @@ final class SystemScreenTest extends WebTestCase
self::assertStringNotContainsString('übersteuert <code>.env</code>', $html);
}
public function testTheScreenNamesThePublicAddressAndNoticesWhenItIsNotTheOneInUse(): void
{
// Die Verwaltung laeuft im Test unter localhost, eingetragen ist https://cms.test: der
// Bildschirm nennt beides, statt so zu tun, als passe es.
$client = $this->login();
$client->request('GET', '/admin/system');
$html = (string) $client->getResponse()->getContent();
self::assertStringContainsString('https://cms.test', $html);
self::assertStringContainsString('läuft gerade unter <code>localhost</code>', $html);
self::assertStringContainsString('cms:site:origin', $html, 'Der Weg, es zu aendern, steht dabei.');
// Unter der eingetragenen Adresse selbst: kein Hinweis, dafuer die Richtung der Umleitung.
$client->request('GET', 'https://cms.test/admin/login');
$client->submit($client->getCrawler()->selectButton('Anmelden')->form(['_username' => 'admin', '_password' => self::FIXTURE_PASSWORD]));
$client->request('GET', 'https://cms.test/admin/system');
$html = (string) $client->getResponse()->getContent();
self::assertStringContainsString('die Schreibweise mit www leitet hierher um', $html);
self::assertStringNotContainsString('läuft gerade unter', $html);
// Und die andere Schreibweise kommt gar nicht erst bis zur Verwaltung.
$client->request('GET', 'https://www.cms.test/admin/system');
self::assertSame(301, $client->getResponse()->getStatusCode());
self::assertSame('https://cms.test/admin/system', $client->getResponse()->headers->get('Location'));
}
public function testTheScreenShowsWhatTheArchiveUpdaterDidInsteadOfDyingOnIt(): void
{
// Der Fehler, den Umut auf seinem Hosting gesehen hat: Das Update lief, legte seine