Skip to content

Commit 8478e95

Browse files
Merge branch '6.4' into 7.2
* 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
2 parents a21ab89 + a57bb00 commit 8478e95

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Authenticator/RemoteUserAuthenticator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ protected function extractUsername(Request $request): ?string
4444
throw new BadCredentialsException(\sprintf('User key was not found: "%s".', $this->userKey));
4545
}
4646

47-
return $request->server->get($this->userKey);
47+
return $request->server->get($this->userKey) ?: null;
4848
}
4949
}

Tests/Authenticator/RemoteUserAuthenticatorTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function testSupportNoUser()
3636
$authenticator = new RemoteUserAuthenticator(new InMemoryUserProvider(), new TokenStorage(), 'main');
3737

3838
$this->assertFalse($authenticator->supports($this->createRequest([])));
39+
$this->assertFalse($authenticator->supports($this->createRequest(['REMOTE_USER' => ''])));
3940
}
4041

4142
public function testSupportTokenStorageWithToken()

0 commit comments

Comments
 (0)