Skip to content

Commit

Permalink
Merge branch '6.4' into 7.2
Browse files Browse the repository at this point in the history
* 6.4:
  [WebProfilerBundle] Fix tests
  [Cache] Tests for Redis Replication with cache
  [BrowserKit] Fix submitting forms with empty file fields
  [WebProfilerBundle] Fix interception for non conventional redirects
  [DependencyInjection] Do not preload functions
  [DependencyInjection] Fix cloned lazy services not sharing their dependencies when dumped with PhpDumper
  [HttpClient] Fix activity tracking leading to negative timeout errors
  [Security] Return null instead of empty username to fix deprecation notice
  [DependencyInjection] Fix env default processor with scalar node
  • Loading branch information
nicolas-grekas committed Feb 11, 2025
2 parents a21ab89 + a57bb00 commit 8478e95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Authenticator/RemoteUserAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ protected function extractUsername(Request $request): ?string
throw new BadCredentialsException(\sprintf('User key was not found: "%s".', $this->userKey));
}

return $request->server->get($this->userKey);
return $request->server->get($this->userKey) ?: null;
}
}
1 change: 1 addition & 0 deletions Tests/Authenticator/RemoteUserAuthenticatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function testSupportNoUser()
$authenticator = new RemoteUserAuthenticator(new InMemoryUserProvider(), new TokenStorage(), 'main');

$this->assertFalse($authenticator->supports($this->createRequest([])));
$this->assertFalse($authenticator->supports($this->createRequest(['REMOTE_USER' => ''])));
}

public function testSupportTokenStorageWithToken()
Expand Down

0 comments on commit 8478e95

Please sign in to comment.