Commit graph

901 commits

Author SHA1 Message Date
Gina Peter Banyard
5583273906 ext/ldap: Use size_t type instead of int type 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
61790eb8a0 ext/ldap: Use uint32_t type instead of int type 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
9af00b174a ext/ldap: Use bool type instead of int type 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
53fde8b5a8 ext/ldap: Remove useless variable 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
b5fb9555e1 ext/ldap: Reduce scope of variable 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
1c820750da ext/ldap: Add static specifier for private function 2025-08-06 16:36:13 +01:00
Gina Peter Banyard
2e53aef1e8 ext/ldap: Remove unused include statement 2025-08-06 16:36:13 +01:00
Jakub Zelenka
a59caa3c33
Merge branch 'PHP-8.4' 2025-07-17 13:45:32 +02:00
Jakub Zelenka
554ae518a2
Merge branch 'PHP-8.3' into PHP-8.4 2025-07-17 13:45:14 +02:00
Jakub Zelenka
8516ae86d7
Skip LDAP TLS max version test for now 2025-07-17 13:44:21 +02:00
Jakub Zelenka
b9844b545f
Merge branch 'PHP-8.4' 2025-07-16 17:32:20 +02:00
Jakub Zelenka
a57f58253a
Merge branch 'PHP-8.3' into PHP-8.4 2025-07-16 17:31:24 +02:00
Jakub Zelenka
eade5c17ea
Fix GH-18529: additional inheriting of TLS int options
This is for LDAP_OPT_X_TLS_PROTOCOL_MIN and LDAP_OPT_X_TLS_PROTOCOL_MAX

It also adds a test that uses LDAPCONF with TLS max version lower than
the minimum TLS server version so it should always fail. However it
does not fial for the second case without this change which confirms
that the change works as expected.

Closes GH-18676
2025-07-16 17:29:42 +02:00
Remi Collet
840dc1981f
fix ldap.h detection without pkgconfig (#19005) 2025-07-03 15:24:35 +02:00
DanielEScherzer
ddd33fd7e4
Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667)
When global constants' or class constants' availability is based on some
preprocessor condition, the generated arginfo header files wrap the
declarations in the preprocessor `#if` conditional blocks, one per declaration,
even if they are in the same conditional block based on comments in the stub
file. Instead of having multiple conditional blocks one after the other with
the same condition, combine them into a single conditional block.
2025-06-22 14:35:28 -07:00
David Carlier
a2461021b6
Merge branch 'PHP-8.4' 2025-06-22 11:46:16 +01:00
David Carlier
0afe0bb777
Merge branch 'PHP-8.3' into PHP-8.4 2025-06-22 11:43:40 +01:00
David Carlier
2694eb9df0
Fixed GH-18902: ldap_exop/ldap_exop_sync assert triggered on empty request OID
close GH-18903
2025-06-22 11:41:23 +01:00
Peter Kokot
25e8aa5cd2
Autotools: Fix ext/ldap shared build (#18673)
This fixes checks when building shared ldap library, or when ldap
installation directory is passed as argument:

    ./configure --with-ldap=shared
    ./configure --with-ldap=/path/to/ldap
    ./configure --with-ldap=shared,/path/to/ldap
2025-05-28 12:08:46 +01:00
David Carlier
4076324c6f
Merge branch 'PHP-8.4' 2025-05-25 12:53:54 +01:00
David Carlier
78f03cd5f2
Merge branch 'PHP-8.3' into PHP-8.4 2025-05-25 12:53:44 +01:00
David Carlier
5d4846b241
ext/ldap: simplify ldap_connect() workflow, fix url leak.
delaying the object creation only before ldap initialisation.
fix forgotten url freeing on TLS error code path.

close GH-18645
2025-05-25 12:53:28 +01:00
Remi Collet
e726d917e7
add more ldaps/tls tests with TLS_CACERTFILE 2025-05-19 07:40:12 +02:00
Remi Collet
1e6909d25e
allow ldap_get_option to retrieve global option 2025-05-19 07:40:09 +02:00
Remi Collet
2e70a8945a
Merge branch 'PHP-8.4'
* PHP-8.4:
  NEWS
  NEWS
  Fix GH-18529: ldap no longer respects TLS_CACERT from ldaprc in ldap_start_tls() Regresion introduced in fix for GH-17776
2025-05-15 09:22:52 +02:00
Remi Collet
8647624261
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS
  Fix GH-18529: ldap no longer respects TLS_CACERT from ldaprc in ldap_start_tls() Regresion introduced in fix for GH-17776
2025-05-15 09:22:09 +02:00
Remi Collet
2760a3ef97
Fix GH-18529: ldap no longer respects TLS_CACERT from ldaprc in ldap_start_tls() Regresion introduced in fix for GH-17776
- ensure TLS string options are properly inherited
  workaround to openldap issue https://bugs.openldap.org/show_bug.cgi?id=10337

- fix ldaps/start_tls tests using LDAPNOINIT in ldaps/tls tests
2025-05-15 09:19:57 +02:00
Niels Dossche
2d3ac4e2ed
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix NULL deref on high modification key
2025-04-16 11:41:33 +02:00
Niels Dossche
bfa2cfc9ed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix NULL deref on high modification key
2025-04-16 11:38:38 +02:00
Niels Dossche
c905d59106
Fix NULL deref on high modification key
We should re-index in the loop.

Closes GH-18331.
2025-04-16 11:37:49 +02:00
Remi Collet
e65fbe1bb8
Merge branch 'PHP-8.4'
* PHP-8.4:
  NEWS for GH-17940
  NEWS for GH-17940
  Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can't be overridden
2025-04-10 17:14:21 +02:00
Remi Collet
bcee2af398
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  NEWS for GH-17940
  Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can't be overridden
2025-04-10 17:13:37 +02:00
Remi Collet
389de7c6bf
Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can't be overridden 2025-04-10 17:07:15 +02:00
Niels Dossche
a2ac800ab8
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18015: Error messages for ldap_mod_replace are confusing
2025-03-15 00:51:28 +01:00
Niels Dossche
6717947ffe
Fix GH-18015: Error messages for ldap_mod_replace are confusing
Closes GH-18053.
2025-03-15 00:42:07 +01:00
Calvin Buckley
3677871347
Use pkg-config for ext/ldap without a directory (#17441)
* Use pkg-config for ext/ldap without a directory

The existing check is not very good. OpenLDAP has been shipping a
pkg-config file for a while now, and that's preferable over trying to
manually find it.

Note that for older OpenLDAP or non-OpenLDAP implementations, a
directory can still be passed to use the old logic. Note that Oracle
LDAP is busted and going away soon; I'm not sure for other LDAP
implementations.

Tested on macOS 14.

* Convert added ifs to AS_IF
2025-02-28 14:39:31 -04:00
Niels Dossche
459fc9de78
Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-17704: ldap_search fails when $attributes contains a non-packed array with numerical keys
2025-02-06 23:31:46 +01:00
Niels Dossche
e3a23069c9
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17704: ldap_search fails when $attributes contains a non-packed array with numerical keys
2025-02-06 23:31:30 +01:00
Niels Dossche
2fb88b2d80
Fix GH-17704: ldap_search fails when $attributes contains a non-packed array with numerical keys
Closes GH-17710.
2025-02-06 23:31:01 +01:00
Gina Peter Banyard
cc3a729995 ext/ldap: Fix FCC is initialized condition 2025-01-09 16:42:58 +00:00
Gina Peter Banyard
915feea12d
ext/ldap: Use FCC for rebind_proc callback (#17369) 2025-01-08 20:52:33 +00:00
Niels Dossche
726c96fbef
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Backport fix GH-17280: ldap_search() fails when $attributes array has holes
2024-12-29 12:19:33 +01:00
Niels Dossche
26f3bec63e
Backport fix GH-17280: ldap_search() fails when $attributes array has holes
Backport of GH-17284 to fix GH-17280 on lower branches.

Closes GH-17287.
2024-12-29 12:19:05 +01:00
Niels Dossche
f90323c8d4
Fix GH-17280: ldap_search() fails when $attributes array has holes (#17284)
We relax the constraint that the array must be a list. What really
matters is that it only has numeric keys. As shown in the example code,
it's really easy to accidentally create a non-list array, so it makes
sense to relax the constraint.
There are 3 cases left where the array is checked to be a list,
in php_ldap_do_search, but I believe this makes sense to keep because
the indices of those arrays have a meaning because they should match
between different arrays. In that case it will prevent programmer
errors.
2024-12-27 17:58:50 +01:00
Jakub Zelenka
4b211a7769
Merge branch 'PHP-8.4' 2024-11-20 11:14:32 +01:00
Jakub Zelenka
7c96af42b7
Merge branch 'PHP-8.3' into PHP-8.4 2024-11-20 11:14:04 +01:00
Jakub Zelenka
ffff27f734
Merge branch 'PHP-8.2' into PHP-8.3 2024-11-20 11:12:19 +01:00
Niels Dossche
fba659abb9
Fix GHSA-g665-fm4p-vhff: OOB access in ldap_escape 2024-11-20 11:06:12 +01:00
Ilija Tovilo
93c9c7c5c1
[skip ci] Update to ubuntu 24.04 for asan in nightly 2024-11-07 22:05:54 +01:00
Christoph M. Becker
59fe79fb45
Merge branch 'PHP-8.4'
* PHP-8.4:
  Skip tests if ldap_set_rebind_proc() is not available
2024-11-07 13:24:33 +01:00