Remove temporary fix for session domain

2020년 3월 한때 develop 브랜치에서 세션 도메인이 잘못 지정되었던 문제를
우회하기 위해 삽입했던 임시 코드를 삭제 또는 주석처리함.

문제가 있던 당시에 develop 브랜치로 업데이트했던 일부 사이트 외에는
필요하지 않은 코드이므로, master 머지를 앞두고 제거함.

참고: #1264
This commit is contained in:
Kijin Sung 2020-04-21 22:48:58 +09:00
parent 04bb0493c7
commit ae36419ee7

View file

@ -213,12 +213,16 @@ class Session
}
// If this is a new session, remove conflicting cookies.
// This is temporary code to take care of a bug that was in develop branch for a few days in March 2020.
// It is not needed if you never updated to a buggy develop branch.
/*
if ($cookie_exists && $domain === null && !isset($_SESSION['conflict_clean']))
{
self::destroyCookiesFromConflictingDomains(array(session_name(), 'rx_autologin', 'rx_sesskey1', 'rx_sesskey2'), true);
session_regenerate_id();
$_SESSION['conflict_clean'] = true;
}
*/
// Create or refresh the session if needed.
if ($must_create)
@ -534,7 +538,7 @@ class Session
self::_unsetCookie('xe_logged', $path, $domain);
self::_unsetCookie('xeak', $path, $domain);
self::_unsetCookie('sso', $path, $domain);
self::destroyCookiesFromConflictingDomains(array('xe_logged', 'xeak', 'sso'), $domain === null);
self::destroyCookiesFromConflictingDomains(array('xe_logged', 'xeak', 'sso'));
// Clear session data.
$_SESSION = array();
@ -1134,7 +1138,7 @@ class Session
}
// Delete conflicting domain cookies.
self::destroyCookiesFromConflictingDomains(array(session_name(), 'rx_autologin', 'rx_sesskey1', 'rx_sesskey2'), $domain === null);
self::destroyCookiesFromConflictingDomains(array(session_name(), 'rx_autologin', 'rx_sesskey1', 'rx_sesskey2'));
return true;
}
@ -1221,7 +1225,7 @@ class Session
'samesite' => $samesite,
));
self::destroyCookiesFromConflictingDomains(array('rx_autologin'), $domain === null);
self::destroyCookiesFromConflictingDomains(array('rx_autologin'));
return true;
}
else
@ -1254,7 +1258,7 @@ class Session
// Delete the autologin cookie.
self::_unsetCookie('rx_autologin', $path, $domain);
self::destroyCookiesFromConflictingDomains(array('rx_autologin'), $domain === null);
self::destroyCookiesFromConflictingDomains(array('rx_autologin'));
unset($_COOKIE['rx_autologin']);
return $result;
}