This commit is contained in:
Jürgen Mummert
2025-12-28 11:18:24 +01:00
parent 0507d7d992
commit 5102f98e2b
+6 -1
View File
@@ -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)) {