<?php
declare(strict_types=1);
require_once __DIR__ . '/../includes/bootstrap.php';
dbnToolsStartSession();
$_SESSION['dbn_tools_guest_ok'] = true;
$raw    = trim((string)($_GET['return'] ?? '/dashboard.php'));
$return = (str_starts_with($raw, '/') && !str_starts_with($raw, '//') && !preg_match('/[\r\n]/', $raw))
    ? $raw
    : '/dashboard.php';
header('Location: ' . $return);
exit;
