Niels Dossche
f9ecf90070
Fix GHSA-g665-fm4p-vhff: OOB access in ldap_escape
2024-11-17 19:29:56 +01:00
Christoph M. Becker
b8ac2071b8
Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
...
There is no `ldap_create()`, but rather `ldap_connect()`.
Closes GH-10115.
2022-12-16 14:36:30 +01:00
Tim Starling
c96be7b8f2
Use ASCII lower case for misc case folding
...
Use ASCII case conversion instead of locale-dependent case conversion in
the following places:
* grapheme_stripos() and grapheme_strripos() in the "fast" path
* ldap_get_entries()
* oci_pconnect() for case folding of parameters when constructing a key
into the connection or session pool
* SoapClient: case folding of function names
* get_meta_tags(): case conversion of property names
* http stream wrapper: header names
* phpinfo(): anchor names
* php_verror(): docref URLs
* rfc1867.c: Content-Type boundary parameter name
* streams.c: stream protocol names
Using locale-dependent case folding for these cases is either
unnecessary or actively incorrect. These functions could have
misbehaved when used with certain locales (e.g. Turkish).
Closes GH-7511.
2021-09-24 09:20:08 +02:00
Joe Watkins
570d9b63e9
Not serializable flag permeation
2021-07-20 12:28:35 +02:00
George Peter Banyard
a6a95e3f51
Do not reuse errno as local variable name
...
errno is a global variable/macro which is implementation defined,
and should not be reused.
This fixes some [-Wstrict-prototypes] warnings.
2021-05-12 15:32:16 +01:00
Ayesh Karunaratne
e0b947a8da
Move resource-object classes of LDAP to \LDAP
namespaces ( #6963 )
...
Another change as per accepted [namespaces in bundled extensions RFC](https://wiki.php.net/rfc/namespaces_in_bundled_extensions ).
Related: #6925 , #5945 , #6960
2021-05-09 22:20:21 +02:00
KsaR
01b3fc03c3
Update http->https in license ( #6945 )
...
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
George Peter Banyard
5caaf40b43
Introduce pseudo-keyword ZEND_FALLTHROUGH
...
And use it instead of comments
2021-04-07 00:46:29 +01:00
Máté Kocsis
cd40fc3cb1
Convert resources to objects in ext/ldap
...
Closes GH-6770
2021-03-21 10:43:25 +01:00
Máté Kocsis
66f16f4eb2
Merge branch 'PHP-8.0'
...
* Fix crash in LDAP search functions during argument validation
* Fix ldap_next_entry() parameter name
2021-03-16 09:34:41 +01:00
Máté Kocsis
b03438ba3a
Fix crash in LDAP search functions during argument validation
2021-03-16 09:31:37 +01:00
Nikita Popov
3e01f5afb1
Replace zend_bool uses with bool
...
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.
Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
Nikita Popov
422d1665a2
Make convert_to_*_ex simple aliases of convert_to_*
...
Historically, the _ex variants separated the zval first, if a
conversion was necessary. This distinction no longer makes sense
since PHP 7.
The only difference that was still left is that _ex checked whether
the type is the same first, but the usage of these macros did not
actually distinguish on whether such an inlined check is valuable
or not in a given context.
Also drop the unused convert_to_explicit_type macros.
2021-01-14 12:11:11 +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
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
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
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
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
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
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
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
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
George Peter Banyard
046ff29958
Fix [-Wundef] warnings in LDAP extension
2020-05-18 00:37:15 +02:00
Máté Kocsis
610815c0ce
Improve gen_stub.php
...
Closes GH-5350
Add support for generating deprecated function entries, as well as forward declaration
of function aliases.
2020-04-04 23:52:33 +02:00
George Peter Banyard
c3e65d9069
Fix [-Wtype-limits] warning in LDAP by removing unnecessary condition
...
As context is a pointer to a berval struct and bv_len is of type
ber_len_t [1] which it self is defined as an unsigned integer [2]
this condition is always true.
[1] https://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=blob;f=include/lber.h#l212
[2] https://www.openldap.org/software//man.cgi?query=ber_free&sektion=3&apropos=0&manpath=OpenLDAP+2.4-Release
2020-02-06 13:20:15 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
...
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
1abea33b1e
Fix usage of RETURN_THROWS() in LDAP extension
2020-01-03 22:40:16 +01:00
Máté Kocsis
aadd3aaed9
Use RETURN_THROWS() in various places
2020-01-03 21:10:24 +01:00
Máté Kocsis
bbcfa66e06
Use RETURN_THROWS() after zend_fetch_resource*()
2020-01-03 19:20:56 +01:00
Christoph M. Becker
d694edaee4
Fix erroneous change
2019-12-31 12:24:01 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
...
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Máté Kocsis
9493893412
Cleanup return values when parameter parsing is unsuccessful
2019-10-30 16:05:20 +01:00
Stephen Reay
72e3b252e8
Adding ldap stubs for arginfo
2019-09-25 15:09:25 +02:00