MSOP-1: restore auth on /v4/radar; keep post-login redirect on current host.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-21 08:45:02 -04:00
parent 67eeb0cdd5
commit 7f9749ed29
2 changed files with 12 additions and 4 deletions

View File

@ -90,10 +90,19 @@ class Login extends CI_Controller {
if ($page) {
setcookie('derniere_page','',time()-3600,'/');
header("Location: ".$page);
// Path only — rester sur le host où on sest logué (pas prod via URL absolue).
if (preg_match('#^https?://#i', $page)) {
$parts = parse_url($page);
$page = ($parts['path'] ?? '/')
. (isset($parts['query']) ? '?'.$parts['query'] : '');
}
if ($page === '' || $page[0] !== '/') {
$page = '/';
}
header('Location: '.$page);
exit;
}
redirect('/');
redirect('/');
}

View File

@ -73,8 +73,7 @@ class Filters extends BaseFilters
*/
public array $globals = [
'before' => [
// TEMP DEV (soirée test) — Radar sans auth. Remettre auth strict après.
'auth' => ['except' => ['radar', 'radar/*']],
'auth',
// 'honeypot',
// 'csrf',
// 'invalidchars',