Skip to content

Commit 342548e

Browse files
committed
Merge branch '4.4'
* 4.4: [Ldap] Documented the deprecation related to query_string
2 parents d4af265 + b6ecca9 commit 342548e

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
@@ -482,6 +482,8 @@ Configuration example for form login and query_string
482482
service: Symfony\Component\Ldap\Ldap
483483
dn_string: 'dc=example,dc=com'
484484
query_string: '(&(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))'
485+
search_dn: '...'
486+
search_password: 'the-raw-password'
485487
486488
.. code-block:: xml
487489
@@ -498,7 +500,9 @@ Configuration example for form login and query_string
498500
<form-login-ldap
499501
service="Symfony\Component\Ldap\Ldap"
500502
dn-string="dc=example,dc=com"
501-
query-string="(&amp;(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))"/>
503+
query-string="(&amp;(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))"
504+
search-dn="..."
505+
search-password="the-raw-password"/>
502506
</firewall>
503507
</config>
504508
</srv:container>
@@ -515,12 +519,19 @@ Configuration example for form login and query_string
515519
'service' => Ldap::class,
516520
'dn_string' => 'dc=example,dc=com',
517521
'query_string' => '(&(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))',
522+
'search_dn' => '...',
523+
'search_password' => 'the-raw-password',
518524
// ...
519525
],
520526
],
521527
]
522528
]);
523529
530+
.. deprecated:: 4.4
531+
532+
Using the ``query_string`` config option without defining ``search_dn`` and
533+
``search_password`` is deprecated since Symfony 4.4.
534+
524535
.. _`LDAP PHP extension`: http://www.php.net/manual/en/intro.ldap.php
525536
.. _`RFC4515`: http://www.faqs.org/rfcs/rfc4515.html
526537
.. _`LDAP injection`: http://projects.webappsec.org/w/page/13246947/LDAP%20Injection

0 commit comments

Comments
 (0)