-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 3.4.31
Description
RFC 2253 support is added in #31406 but it doesn't work if any OU name includes dot character (".") - regex in method \Symfony\Component\Security\Http\Firewall\X509AuthenticationListener::getPreAuthenticatedData() fails to select e-mail address.
How to reproduce
Test with the following DN:
emailAddress=john.doe@example.com,CN=John Doe,OU=Foo,OU=Name.With.Dot,DC=Bar
Possible Solution
Change regex to cover described use case.
Consider this one:
#(?:^|,|/)emailAddress=([^,/]+)#
Also, probably it is wise to add before mentioned example as additional test case in \Symfony\Component\Security\Http\Tests\Firewall\X509AuthenticationListenerTest::dataProviderGetPreAuthenticatedDataNoUser()