8000 fix bug surrounding cookie session driver. · allforweb/laravel@affcad0 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit affcad0

Browse files
committed
fix bug surrounding cookie session driver.
1 parent 9c823d4 commit affcad0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

laravel/session/drivers/driver.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ public function id()
5555
{
5656
$session = array();
5757

58+
// If the driver is an instance of the Cookie driver, we are able to
59+
// just return any string since the Cookie driver has no real idea
60+
// of a server side persisted session with an ID.
61+
if ($this instanceof Cookie)
62+
{
63+
return Str::random(40);
64+
}
65+
5866
// We'll containue generating random IDs until we find an ID that is
5967
// not currently assigned to a session. This is almost definitely
6068
// going to happen on the first iteration.

0 commit comments

Comments
 (0)
0