Commit Graph

713 Commits

Author SHA1 Message Date
Christoph M. Becker
c3734f9ae1 ldap_exop_whoami() does not return TRUE
Closes GH-6496.
2020-12-08 11:44:04 +01:00
Côme Chilliet
15a3eca3ef Change $controls parameter to default to null in ext/ldap
It appeared that not passing $controls and passing [] caused different
 behaviors, when not passing it the controls set through ldap_set_option
 would be used, when passing [] they would not.

So, this parameter is now nullable and defaults to null to have a
 consistent behavior.
2020-10-15 11:48:47 +02:00
Nikita Popov
1610e81b51 Mark ldap_exop() param as UNKNOWN
This function actually has very different behavior depending on
whether $response_data is passed or not.
2020-10-14 16:38:56 +02:00
Côme Chilliet
550a4f2fa8 Remove deprecated functions from php-ldap
Remove ldap_control_paged_result and ldap_control_paged_result_response
 which have been deprecated in PHP 7.4, in favor of new $controls
 parameters for ldap request functions.
2020-10-01 10:15:27 +02:00
Côme Chilliet
1945355435 Improve parameter names in ext/ldap
Merging PR 6153
2020-09-29 16:31:08 +02:00
MCMic
3b3445f783 Harmonize ldap_rename_ext with ldap_rename parameter names
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
2020-09-29 16:31:08 +02:00
Côme Chilliet
1d3787ee94 Rename $link parameters to $ldap in ldap functions
Also fixed ldap_set_option places where $newvalue was still used
2020-09-29 16:31:08 +02:00
MCMic
29e1a9717d Improve parameter naming in ldap_rename
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
2020-09-29 16:31:08 +02:00
MCMic
462c94447e Improve parameter naming in ldap_exop_passwd
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
2020-09-29 16:31:08 +02:00
MCMic
27fe37e394 Improve parameter naming in ldap_connect
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
2020-09-29 16:31:08 +02:00
MCMic
febd33cf7e Improve parameter naming in ldap_set_option ext/ldap/ldap.stub.php
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
2020-09-29 16:31:07 +02:00
Côme Chilliet
fa1f86f11c Explicitely mark nullable strings 2020-09-29 16:31:07 +02:00
MCMic
a835eee2cf Fix parameter mask in ldap_next_attribute
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
2020-09-29 16:31:07 +02:00
Côme Chilliet
c2a6da5ab2 Fix parameter names in ext/ldap
Renamed all parameters to be consistent and concise
2020-09-29 16:31:07 +02:00
Côme Chilliet
2a34d35a66 Fix "null" case in ldap.stub.php 2020-09-29 16:31:07 +02:00
Côme Chilliet
eeec37d31d Remove dummy_ber parameter from ldap_first_attribute and ldap_next_attribute
It has been unused and deprecated since PHP 5.2.4
2020-09-29 16:31:07 +02:00
Côme Chilliet
caa0cd7705 Set all parameters to ldap_sasl_bind as NULL by default
For mech, realm, authcid, authzid and props NULL means do not change
 current server setting.
2020-09-29 16:31:07 +02:00
Côme Chilliet
74b634751b Default bind dn and password to NULL in ldap_bind_ext 2020-09-29 16:31:07 +02:00
Côme Chilliet
14385fb203 Default bind dn and password to NULL in ldap_bind 2020-09-29 16:31:07 +02:00
Côme Chilliet
6b77252f18 Make URI parameter in ldap_connect default to NULL 2020-09-29 16:31:07 +02:00
Máté Kocsis
e950ca13ea
Consolidate the usage of "either" and "one of" in error messages
Closes GH-6173
2020-09-20 19:41:47 +02:00
Nikita Popov
c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00
Máté Kocsis
36fd95b524
Generate arginfos 2020-09-16 21:28:27 +02:00
Máté Kocsis
de912821e0
Display string default values in stubs more uniformly
Settling on using quoted string
2020-09-16 21:27:01 +02:00
Máté Kocsis
c98d47696f
Consolidate new union type ZPP macro names
They will now follow the canonical order of types. Older macros are
left intact due to maintaining BC.

Closes GH-6112
2020-09-11 11:00:18 +02:00
Máté Kocsis
36cdbd0549
Promote warnings to exceptions in ext/ldap
Closes GH-6065
2020-09-04 15:26:16 +02:00
Máté Kocsis
8107a1da5a
Use ZPP instead of custom type checks
We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
2020-09-04 14:32:34 +02:00
George Peter Banyard
96c7d42a3c Use ZPP callable check for ldap_set_rebind_proc() 2020-08-13 21:14:51 +02:00
Máté Kocsis
046cc5e4c2
Add another round of missing parameter types to stubs
Closes GH-5950
2020-08-07 16:48:45 +02:00
Máté Kocsis
6b7e2f0d15
Fix stub hash of ext/ldap 2020-08-03 01:06:21 +02:00
Máté Kocsis
79981a394e
Add a bunch of missing argument types to stubs 2020-08-03 00:45:51 +02:00
Máté Kocsis
156c1806db
Convert the $ttl parameter of ldap_exop_refresh() to int 2020-08-03 00:38:59 +02:00
Côme Chilliet
08dcb8e604 Merge branch 'PHP-7.4'
* PHP-7.4:
  Updated NEWS
  fix memory leaks in ext/ldap/ldap.c
  fix memory leaks in ext/ldap/ldap.c
2020-07-28 10:29:59 +02:00
Paweł Tomulik
fef5a9e502 fix memory leaks in ext/ldap/ldap.c 2020-07-28 10:27:22 +02:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
Closes GH-5590
2020-07-10 21:05:28 +02:00
Nikita Popov
bc68f10b76 Merge branch 'PHP-7.4'
* PHP-7.4:
  enable ext/ldap/tests on azure
  fix some ext/ldap/tests
2020-07-10 09:57:13 +02:00
Paweł Tomulik
b291c92693 enable ext/ldap/tests on azure 2020-07-10 09:56:02 +02:00
Paweł Tomulik
c6ab3084df fix some ext/ldap/tests 2020-07-10 09:56:02 +02:00
Nikita Popov
bee2cf0899 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix some memory bugs in ldap.c
2020-07-10 09:50:12 +02:00
Nikita Popov
22352868ec Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix some memory bugs in ldap.c
2020-07-10 09:49:50 +02:00
Paweł Tomulik
23ef0a1285 Fix some memory bugs in ldap.c 2020-07-09 18:35:00 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
0280b83e11 Avoid some unnecessary uses of no_separation=0
For the rare cases where references are part of the API,
construct them explicitly. Otherwise do not allow separation.
2020-07-06 19:05:57 +02:00
Paweł Tomulik
915abeb699 Add ldap_count_references()
Closes GH-5784
2020-07-01 09:29:46 +02:00
Paweł Tomulik
b3698ed9eb
Promote warning to exception in ldap_set_rebind_proc()
From now on, ldap_set_rebind_proc() will only accept callable or null
as argument 2.

Closes GH-5763
2020-06-30 16:08:34 +02:00
Fabien Villepinte
0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +02:00
Christoph M. Becker
07ff243f07 Fix macro redifinition warnings in debug builds
MSVC considers these warnings[1] to be severe (level 1), so we better
fix the respective code.

[1] <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005?view=vs-2019>
2020-06-29 19:11:22 +02:00
Nikita Popov
c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
George Peter Banyard
046ff29958 Fix [-Wundef] warnings in LDAP extension 2020-05-18 00:37:15 +02:00
George Peter Banyard
b91c2845cf Drop check for HAVE_NSLDAP
This constant is never defined thus useless
2020-05-16 00:40:37 +02:00