This commit is contained in:
宋辰轩
2024-04-10 15:15:00 +08:00
parent e377e119d1
commit c575a429d5
4 changed files with 18 additions and 47 deletions
+5 -6
View File
@@ -1166,16 +1166,15 @@ class baseRouter
$this->sessionID = isset($ztSessionHandler) ? $ztSessionHandler->getSessionID() : session_id();
/* Keep session if 'zentaosid'(session id) in $_GET. */
if(isset($_GET[$this->config->sessionVar]))
{
helper::restartSession($_GET[$this->config->sessionVar]);
}
elseif(isset($_SERVER['HTTP_TOKEN'])) // If request header has token, use it as session for authentication.
if(isset($_SERVER['HTTP_TOKEN'])) // If request header has token, use it as session for authentication.
{
helper::restartSession($_SERVER['HTTP_TOKEN']);
$this->sessionID = isset($ztSessionHandler) ? $ztSessionHandler->getSessionID() : session_id();
}
elseif(isset($_GET[$this->config->sessionVar]))
{
helper::restartSession($_GET[$this->config->sessionVar]);
}
define('SESSION_STARTED', true);
}