Commit ddfb4a8
committed
bug #46325 [Ldap] Fix LDAP connection options (buffcode)
This PR was merged into the 4.4 branch.
Discussion
----------
[Ldap] Fix LDAP connection options
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
This PR adds support for the [`LDAP_OPT_X_TLS_CACERTFILE`](https://www.php.net/manual/de/ldap.constants.php#constant.ldap-opt-x-tls-cacertfile) option in order to specify a CA file which should be used. It is available since the same PHP version [as the other options](https://www.php.net/manual/de/function.ldap-set-option.php) and may just have been forgotten.
Furthermore the connection options need to be applied at different stages in order to be effective.
Connection options are tagged to be preconnect-options and are executed before `ldap_connect`, all other options continue to be applied between `ldap_connect` and `ldap_bind`.
Be aware that [there is no LDAP documentation](https://www.openldap.org/software/man.cgi?query=ldap_get_option&apropos=0&sektion=0&manpath=OpenLDAP+2.6-Release&arch=default&format=html) about which option is global and thus not requiring a connection and which needs one.
The preconnect options from this PR come from trial-and-error testing and mailing list entries at OpenLDAP.
Maybe also relevant:
- https://bugs.php.net/bug.php?id=73558
- https://bugs.php.net/bug.php?id=78029
Commits
-------
78a9c59 Fix LDAP connection optionsFile tree
2 files changed
+16
-1
lines changed- src/Symfony/Component/Ldap/Adapter/ExtLdap
2 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
147 | 153 | | |
148 | 154 | | |
149 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
153 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
154 | 168 | | |
155 | 169 | | |
156 | 170 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
0 commit comments