Skip to content

Commit 1d36e2a

Browse files
Merge branch '3.4' into 4.3
* 3.4: Sync Twig templateExists behaviors Fix the :only-of-type pseudo class selector [Serializer] Add CsvEncoder tests for PHP 7.4 Copy phpunit.xsd to a predictable path [Security/Http] fix parsing X509 emailAddress [Serializer] fix denormalization of string-arrays with only one element #33731 [Cache] fix known tag versions ttl check
2 parents 2500a18 + 5fd4bc1 commit 1d36e2a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Firewall/X509AuthenticationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function getPreAuthenticatedData(Request $request)
4646
$user = $request->server->get($this->userKey);
4747
} elseif (
4848
$request->server->has($this->credentialKey)
49-
&& preg_match('#emailAddress=(.+\@.+\.[^,/]+)($|,|/)#', $request->server->get($this->credentialKey), $matches)
49+
&& preg_match('#emailAddress=([^,/@]++@[^,/]++)#', $request->server->get($this->credentialKey), $matches)
5050
) {
5151
$user = $matches[1];
5252
}

Tests/Firewall/X509AuthenticationListenerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public static function dataProviderGetPreAuthenticatedDataNoUser()
8181
yield ['cert+something@example.com', 'CN=Sample certificate DN,emailAddress=cert+something@example.com'];
8282
yield ['cert+something@example.com', 'emailAddress=cert+something@example.com,CN=Sample certificate DN'];
8383
yield ['cert+something@example.com', 'emailAddress=cert+something@example.com'];
84+
yield ['firstname.lastname@mycompany.co.uk', 'emailAddress=firstname.lastname@mycompany.co.uk,CN=Firstname.Lastname,OU=london,OU=company design and engineering,OU=Issuer London,OU=Roaming,OU=Interactive,OU=Users,OU=Standard,OU=Business,DC=england,DC=core,DC=company,DC=co,DC=uk'];
8485
}
8586

8687
public function testGetPreAuthenticatedDataNoData()

0 commit comments

Comments
 (0)