Skip to content

Commit

Permalink
check session path
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Sep 13, 2023
1 parent fe4fc5e commit 77cde40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Protocols/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,9 @@ public static function sessionStart()
return true;
}
HttpCache::$instance->sessionStarted = true;
if (isset($_COOKIE[HttpCache::$sessionName]) && !\preg_match('/^[a-zA-Z0-9]+$/', $_COOKIE[HttpCache::$sessionName])) {
unset($_COOKIE[HttpCache::$sessionName]);
}
// Generate a SID.
if (!isset($_COOKIE[HttpCache::$sessionName]) || !\is_file(HttpCache::$sessionPath . '/ses_' . $_COOKIE[HttpCache::$sessionName])) {
// Create a unique session_id and the associated file name.
Expand Down

0 comments on commit 77cde40

Please sign in to comment.