Ignore stale opd appointment intended URL after login
This commit is contained in:
parent
2795e6255c
commit
5c5d6694c0
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user