Skip to content

[Ldap] Documented the deprecation related to query_string #12050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion security/ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ Configuration example for form login and query_string
service: Symfony\Component\Ldap\Ldap
dn_string: 'dc=example,dc=com'
query_string: '(&(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))'
search_dn: '...'
search_password: 'the-raw-password'

.. code-block:: xml

Expand All @@ -502,7 +504,9 @@ Configuration example for form login and query_string
<form-login-ldap
service="Symfony\Component\Ldap\Ldap"
dn-string="dc=example,dc=com"
query-string="(&amp;(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))"/>
query-string="(&amp;(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))"
search-dn="..."
search-password="the-raw-password"/>
</firewall>
</config>
</srv:container>
Expand All @@ -519,12 +523,19 @@ Configuration example for form login and query_string
'service' => Ldap::class,
'dn_string' => 'dc=example,dc=com',
'query_string' => '(&(uid={username})(memberOf=cn=users,ou=Services,dc=example,dc=com))',
'search_dn' => '...',
'search_password' => 'the-raw-password',
// ...
],
],
]
]);

.. deprecated:: 4.4

Using the ``query_string`` config option without defining ``search_dn`` and
``search_password`` is deprecated since Symfony 4.4.

.. _`LDAP PHP extension`: http://www.php.net/manual/en/intro.ldap.php
.. _`RFC4515`: http://www.faqs.org/rfcs/rfc4515.html
.. _`LDAP injection`: http://projects.webappsec.org/w/page/13246947/LDAP%20Injection