This commit is contained in:
Jürgen Mummert
2025-12-26 11:34:44 +01:00
parent 8f3a0ad1b2
commit 654a1a8ec8
2 changed files with 14 additions and 2 deletions
+8 -1
View File
@@ -107,7 +107,14 @@ class OfficeIndexService
parse_str($parts['query'], $query); parse_str($parts['query'], $query);
if (!empty($query['p'])) { if (!empty($query['p'])) {
$p = rawurldecode((string) $query['p']); $p = (string) $query['p'];
// Query-Parameter korrekt dekodieren
$p = urldecode($p);
// Leerzeichen aus Query-Parametern wieder zu '+' normalisieren
$p = str_replace(' ', '+', $p);
$ext = strtolower(pathinfo($p, PATHINFO_EXTENSION)); $ext = strtolower(pathinfo($p, PATHINFO_EXTENSION));
if (in_array($ext, ['docx', 'xlsx', 'pptx'], true)) { if (in_array($ext, ['docx', 'xlsx', 'pptx'], true)) {
+6 -1
View File
@@ -132,7 +132,12 @@ class PdfIndexService
if (!empty($query['p'])) { if (!empty($query['p'])) {
$p = (string) $query['p']; $p = (string) $query['p'];
$p = rawurldecode($p);
// Query-Parameter korrekt dekodieren
$p = urldecode($p);
// Leerzeichen aus Query-Parametern wieder zu '+' normalisieren
$p = str_replace(' ', '+', $p);
// deine Links enthalten oft "pdf/DATEI.pdf" // deine Links enthalten oft "pdf/DATEI.pdf"
// => wird zu "/files/pdf/DATEI.pdf" // => wird zu "/files/pdf/DATEI.pdf"