Add Paramètres page: consolidate maintenance + account settings

This commit is contained in:
Pontoporeia
2026-04-08 15:06:51 +02:00
parent ba135f0cb5
commit 603af07b68
8 changed files with 262 additions and 35 deletions

View File

@@ -24,5 +24,10 @@ if ($action === 'enable_maintenance') {
App::flash('error', "Action inconnue.");
}
header('Location: /admin/');
$redirect = isset($_POST['redirect']) ? $_POST['redirect'] : '/admin/';
// Allow only internal admin redirects for safety
if (!preg_match('#^/admin/#', $redirect)) {
$redirect = '/admin/';
}
header('Location: ' . $redirect);
exit();