Skip to content

Commit b182cea

Browse files
committed
Session: do not regenerate session ID when is newly created
1 parent fb79e66 commit b182cea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Http/Session.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ private function initialize(): void
123123
// regenerate empty session
124124
if (empty($nf['Time'])) {
125125
$nf['Time'] = time();
126-
$this->regenerateId(); // ensures that the session was created in strict mode (see use_strict_mode)
126+
if ($this->request->getCookie(session_name())) { // ensures that the session was created in strict mode (see use_strict_mode)
127+
$this->regenerateId();
128+
}
127129
}
128130

129131
// process meta metadata

0 commit comments

Comments
 (0)