Skip to content

Commit

Permalink
Merge branch '6.x' into 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Aug 26, 2020
2 parents f64299a + 0eb542d commit aa4e269
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Illuminate/Redis/Connectors/PhpRedisConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Redis\Connections\PhpRedisConnection;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Redis as RedisFacade;
use Illuminate\Support\Str;
use LogicException;
use Redis;
use RedisCluster;
Expand Down Expand Up @@ -183,7 +184,7 @@ protected function createRedisClusterInstance(array $servers, array $options)
protected function formatHost(array $options)
{
if (isset($options['scheme'])) {
return "{$options['scheme']}://{$options['host']}";
return Str::start($options['host'], "{$options['scheme']}://");
}

return $options['host'];
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Session/Middleware/AuthenticateSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public function handle($request, Closure $next)
}

if ($this->auth->viaRemember()) {
$passwordHash = explode('|', $request->cookies->get($this->auth->getRecallerName()))[2];
$passwordHash = explode('|', $request->cookies->get($this->auth->getRecallerName()))[2] ?? null;

if ($passwordHash != $request->user()->getAuthPassword()) {
if (! $passwordHash || $passwordHash != $request->user()->getAuthPassword()) {
$this->logout($request);
}
}
Expand Down

0 comments on commit aa4e269

Please sign in to comment.