From c4f615e711c32b80fe98942da36bb00690c9db2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 12 Jun 2025 22:05:57 +0200 Subject: [PATCH 1/2] Hide sensitive information in production --- templates/bundles/TwigBundle/Exception/error.html.twig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/templates/bundles/TwigBundle/Exception/error.html.twig b/templates/bundles/TwigBundle/Exception/error.html.twig index bbda97737..8b3cea544 100644 --- a/templates/bundles/TwigBundle/Exception/error.html.twig +++ b/templates/bundles/TwigBundle/Exception/error.html.twig @@ -15,10 +15,6 @@
{{ status_code }}: {{ status_text }}
-

{{ exception.message }}

- {# {% for trace in exception.trace %} -

{{ trace.class }} - {{ trace.type }} - {{ trace.file }} - {{ trace.line }}

- {% endfor %} #}
From 5db128a071c94195d36562845f2bf1dc381f2a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 17 Jun 2025 20:19:30 +0200 Subject: [PATCH 2/2] Fix tests --- tests/Controller/ConfigControllerTest.php | 2 +- tests/Controller/EntryControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Controller/ConfigControllerTest.php b/tests/Controller/ConfigControllerTest.php index f41f25c13..7ee20c9ab 100644 --- a/tests/Controller/ConfigControllerTest.php +++ b/tests/Controller/ConfigControllerTest.php @@ -1130,7 +1130,7 @@ class ConfigControllerTest extends WallabagTestCase $this->assertSame(400, $client->getResponse()->getStatusCode()); $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); - $this->assertStringContainsString('Bad CSRF token.', $body[0]); + $this->assertStringContainsString('400: Bad Request', $body[0]); } public function testChangeLocaleWithReferer() diff --git a/tests/Controller/EntryControllerTest.php b/tests/Controller/EntryControllerTest.php index c90b2acac..d4fd1d376 100644 --- a/tests/Controller/EntryControllerTest.php +++ b/tests/Controller/EntryControllerTest.php @@ -732,7 +732,7 @@ class EntryControllerTest extends WallabagTestCase $this->assertSame(400, $client->getResponse()->getStatusCode()); $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); - $this->assertStringContainsString('Bad CSRF token.', $body[0]); + $this->assertStringContainsString('400: Bad Request', $body[0]); } /**