From 5c5d6694c008437425b9f4246c66b6484e43ae48 Mon Sep 17 00:00:00 2001 From: DevSoftTech Server Date: Wed, 8 Apr 2026 19:57:40 +0530 Subject: [PATCH] Ignore stale opd appointment intended URL after login --- app/Config/Auth.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Config/Auth.php b/app/Config/Auth.php index 2d49eae..c3f8242 100644 --- a/app/Config/Auth.php +++ b/app/Config/Auth.php @@ -443,12 +443,16 @@ class Auth extends ShieldAuth $session = session(); $beforeLoginUrl = (string) ($session->getTempdata('beforeLoginUrl') ?? ''); - // Some AJAX workspace URLs can be stored as beforeLoginUrl in production + // Some temporary/internal URLs can be stored as beforeLoginUrl in production // and then hijack post-login landing. Skip those and use configured default. if ($beforeLoginUrl !== '') { $path = (string) parse_url($beforeLoginUrl, PHP_URL_PATH); $path = '/' . ltrim($path, '/'); - if ($path === '/doctor_work/document_workspace') { + $blockedPaths = [ + '/doctor_work/document_workspace', + '/opd/appointment', + ]; + if (in_array(strtolower($path), $blockedPaths, true)) { $beforeLoginUrl = ''; $session->removeTempdata('beforeLoginUrl'); }