Skip to content

Commit 382c5c8

Browse files
committed
[Ldap] Documented the deprecation related to query_string
1 parent b4da05b commit 382c5c8

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

security/ldap.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ Configuration example for form login and query_string
486486
service: Symfony\Component\Ldap\Ldap
487487
dn_string: 'dc=example,dc=com'
488488
query_string: '(&(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))'
489+
search_dn: '...'
490+
search_password: 'the-raw-password'
489491
490492
.. code-block:: xml
491493
@@ -502,7 +504,9 @@ Configuration example for form login and query_string
502504
<form-login-ldap
503505
service="Symfony\Component\Ldap\Ldap"
504506
dn-string="dc=example,dc=com"
505-
query-string="(&amp;(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))"/>
507+
query-string="(&amp;(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))"
508+
search-dn="..."
509+
search-password="the-raw-password"/>
506510
</firewall>
507511
</config>
508512
</srv:container>
@@ -519,12 +523,19 @@ Configuration example for form login and query_string
519523
'service' => Ldap::class,
520524
'dn_string' => 'dc=example,dc=com',
521525
'query_string' => '(&(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))',
526+
'search_dn' => '...',
527+
'search_password' => 'the-raw-password',
522528
// ...
523529
],
524530
],
525531
]
526532
]);
527533
534+
.. deprecated:: 4.4
535+
536+
Using the ``query_string`` config option without defining ``search_dn`` and
537+
``search_password`` is deprecated since Symfony 4.4.
538+
528539
.. _`LDAP PHP extension`: http://www.php.net/manual/en/intro.ldap.php
529540
.. _`RFC4515`: http://www.faqs.org/rfcs/rfc4515.html
530541
.. _`LDAP injection`: http://projects.webappsec.org/w/page/13246947/LDAP%20Injection

0 commit comments

Comments
 (0)