From 5102f98e2b6802a8051d275886d8c34d64ef1ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mummert?= Date: Sun, 28 Dec 2025 11:18:24 +0100 Subject: [PATCH] Bugfix --- src/EventListener/IndexPageListener.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/EventListener/IndexPageListener.php b/src/EventListener/IndexPageListener.php index 504034b..86733c9 100644 --- a/src/EventListener/IndexPageListener.php +++ b/src/EventListener/IndexPageListener.php @@ -222,7 +222,12 @@ class IndexPageListener foreach (['file', 'p', 'f'] as $param) { if (!empty($query[$param])) { - $candidate = urldecode((string) $query[$param]); + $candidate = (string) $query[$param]; + + // sicher decodieren (Contao 4 + 5) + $candidate = html_entity_decode($candidate, ENT_QUOTES); + $candidate = rawurldecode($candidate); + $ext = strtolower(pathinfo($candidate, PATHINFO_EXTENSION)); if (in_array($ext, ['pdf', 'docx', 'xlsx', 'pptx'], true)) {