From 1e7c1abb592d0b5ce159a914afa9ad718b7ac02e Mon Sep 17 00:00:00 2001 From: svyrydenko Date: Fri, 22 Dec 2017 13:24:08 +0200 Subject: [PATCH] Fix double-serialized --- src/RedisAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RedisAuth.php b/src/RedisAuth.php index b78261b..80c0c9d 100644 --- a/src/RedisAuth.php +++ b/src/RedisAuth.php @@ -47,7 +47,7 @@ public static function getUserIdByHeaders(array $headers) if (!$sessionFile = @$redis->get(config('cache.prefix', 'laravel') . ':' . $sessionName)) { return false; } else { - $object = @unserialize($sessionFile); + $object = @unserialize(unserialize($sessionFile)); $userId = @$object['login_web_' . sha1(SessionGuard::class)]; return $userId; }