From e02e59dfcdf497146e5aeb161449542c58cc1854 Mon Sep 17 00:00:00 2001 From: seo Date: Tue, 28 Jul 2026 22:55:12 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B0=A8=EB=9F=89=20=EB=AA=A8=EB=8B=88?= =?UTF-8?q?=ED=84=B0=20=EA=B4=80=EB=A6=AC=EC=9E=90=20=EC=84=B8=EC=85=98=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=20=EB=B3=B4=EA=B0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- monitor.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/monitor.php b/monitor.php index 8fb41a5..816becc 100644 --- a/monitor.php +++ b/monitor.php @@ -952,11 +952,16 @@ function car_monitor_launcher_session(): array $cookieHeader = trim((string)($_SERVER['HTTP_COOKIE'] ?? '')); if ($cookieHeader !== '') { + $adminSession = car_monitor_launcher_api_request('GET', 'https://chaegeon.com/custom/launcher/api.php?adminSession=1', null, $cookieHeader); + if (is_array($adminSession) && !empty($adminSession['authenticated']) && !empty($adminSession['admin'])) { + car_monitor_issue_cookie(); + $session = ['authenticated' => true, 'admin' => true]; + return $session; + } + $remoteSession = car_monitor_launcher_api_request('GET', 'https://chaegeon.com/custom/launcher/api.php?session=1', null, $cookieHeader); - if (is_array($remoteSession)) { - if (!empty($remoteSession['authenticated'])) { - car_monitor_issue_cookie(); - } + if (is_array($remoteSession) && !empty($remoteSession['authenticated'])) { + car_monitor_issue_cookie(); $session = $remoteSession; return $session; } @@ -1086,11 +1091,13 @@ function car_monitor_issue_pwa_cookie_if_requested(): void } $cookieHeader = trim((string)($_SERVER['HTTP_COOKIE'] ?? '')); - $remoteSession = $cookieHeader !== '' - ? car_monitor_launcher_api_request('GET', 'https://chaegeon.com/custom/launcher/api.php?session=1', null, $cookieHeader) - : null; - if (is_array($remoteSession) && !empty($remoteSession['authenticated'])) { - car_monitor_issue_cookie(); + if ($cookieHeader !== '') { + $adminSession = car_monitor_launcher_api_request('GET', 'https://chaegeon.com/custom/launcher/api.php?adminSession=1', null, $cookieHeader); + $remoteSession = car_monitor_launcher_api_request('GET', 'https://chaegeon.com/custom/launcher/api.php?session=1', null, $cookieHeader); + if ((is_array($adminSession) && !empty($adminSession['authenticated'])) + || (is_array($remoteSession) && !empty($remoteSession['authenticated']))) { + car_monitor_issue_cookie(); + } } header('Location: /car/monitor.php', true, 302);