Fix admin form actions and redirects: replace & with ? for query parameters

This commit is contained in:
2026-07-21 12:45:58 +02:00
parent 0ccd89824f
commit 064e905f31
9 changed files with 31 additions and 31 deletions
+7 -7
View File
@@ -405,7 +405,7 @@ function handleContentNew(AdminAuth $auth, array $config): void
}
file_put_contents($filePath, $content);
header('Location: /admin/content&dir=' . urlencode($dir));
header('Location: /admin/content?dir=' . urlencode($dir));
exit;
}
}
@@ -454,7 +454,7 @@ function handleContentDelete(AdminAuth $auth, array $config): void
}
$dir = dirname($file);
header('Location: /admin/content&dir=' . urlencode($dir === '.' ? '' : $dir));
header('Location: /admin/content?dir=' . urlencode($dir === '.' ? '' : $dir));
exit;
}
@@ -470,7 +470,7 @@ function handleContentDirCreate(AdminAuth $auth, array $config): void
$subdir = str_replace(['../', '..\\'], '', $subdir);
if (!$auth->verifyCsrf($_POST['csrf_token'] ?? '')) {
header('Location: /admin/content&dir=' . urlencode($subdir));
header('Location: /admin/content?dir=' . urlencode($subdir));
exit;
}
@@ -483,7 +483,7 @@ function handleContentDirCreate(AdminAuth $auth, array $config): void
}
}
header('Location: /admin/content&dir=' . urlencode($subdir));
header('Location: /admin/content?dir=' . urlencode($subdir));
exit;
}
@@ -518,7 +518,7 @@ function handleContentDirRename(AdminAuth $auth, array $config): void
}
$parentRelative = dirname($dir);
header('Location: /admin/content&dir=' . urlencode($parentRelative === '.' ? '' : $parentRelative));
header('Location: /admin/content?dir=' . urlencode($parentRelative === '.' ? '' : $parentRelative));
exit;
}
@@ -560,7 +560,7 @@ function handleContentMove(AdminAuth $auth, array $config): void
}
$parentRelative = is_file($fullPath) ? dirname($item) : dirname($item);
header('Location: /admin/content&dir=' . urlencode($parentRelative === '.' ? '' : $parentRelative));
header('Location: /admin/content?dir=' . urlencode($parentRelative === '.' ? '' : $parentRelative));
exit;
}
@@ -598,7 +598,7 @@ function handleContentDirDelete(AdminAuth $auth, array $config): void
}
$parentDir = dirname($dir);
header('Location: /admin/content&dir=' . urlencode($parentDir === '.' ? '' : $parentDir));
header('Location: /admin/content?dir=' . urlencode($parentDir === '.' ? '' : $parentDir));
exit;
}