mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Add Paramètres page: consolidate maintenance + account settings
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user