Commit Graph

757 Commits

Author SHA1 Message Date
Máté Kocsis
b3bd55f244 Implement ldap_exop_sync 2023-07-18 12:59:21 +02:00
Máté Kocsis
72aada3c7c Implement ldap_connect_wallet() 2023-07-18 12:59:21 +02:00
Andreas Heigl
69a8b63ecf
Deprecate ldap_connect with two parameters (#5177)
* Deprecate ldap_connect with two parameters

ldap_connect should be called with an LDAP-URI as parameter and not with
2 parameters as that allows much more flexibility like differentiating
between ldap and ldaps or setting multiple ldap-servers.

This change requires one to add null as second parameter in case the
underlying library is Oracle and one wants to add wallet-details.

* Modify all ldap-tests to use ldap_connect right

All tests are using ldap_connect now with an URI and not with host and
port as two separarte parameters.

* Verify deprecation of ldap_connect w/h 2 params

This adds a test to verify that calling ldap_connect with 2 parameters
triggers a deprecation notice

* Remove empty test

`ldap_control_paged_result()` is removed as of PHP 8.0.0, so this test
needs to be removed as well.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2023-07-10 10:44:01 +01:00
George Peter Banyard
d5ad75108e
More usage of known zend_str instead of C string (#11381) 2023-06-08 13:03:29 +01:00
Máté Kocsis
7936c8085e
Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385) 2023-01-23 10:52:14 +01:00
Christoph M. Becker
cea0fc04d1
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
2022-12-16 14:38:09 +01:00
Christoph M. Becker
018fbd0a68
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
2022-12-16 14:37:39 +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
Bob Weinand
a01dd9feda Revert "Port all internally used classes to use default_object_handlers"
This reverts commit 94ee4f9834.

The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.
2022-09-14 11:13:23 +02:00
Máté Kocsis
e733ebf30e
Add parenthesis around preprocessor conditions in stubs
gen_stub.php concatenates nested #ifs into one #if so let's make sure the semantics remain the same.
2022-09-02 16:21:28 +02:00
Bob Weinand
94ee4f9834 Port all internally used classes to use default_object_handlers
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2022-08-31 16:45:27 +02:00
Máté Kocsis
b4ec3e9bc0
Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Máté Kocsis
e328c68305
Rename @cname to @cvalue in stubs (#9043)
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
2022-07-19 15:11:42 +02:00
Remi Collet
55a88f36b6
add SensitiveParameter as known string and use it in arginfo 2022-07-18 11:43:33 +02:00
Tim Düsterhus
342e18f105
Support the actual #[\SensitiveParameter] attribute in stubs (#8836) 2022-07-12 12:43:44 +02:00
Pierrick Charron
6fd2b39397
Indent with TAB in .h files generated by gen_stub 2022-06-13 08:55:54 -04:00
Tim Düsterhus
788b7a0c6c Mark parameter in ext/ldap as sensitive 2022-06-13 11:09:12 +02:00
Máté Kocsis
e7c30c059c
Declare ext/ldap constants in stubs (#8717) 2022-06-06 21:30:10 +02:00
Nikita Popov
605ac4649c Merge branch 'PHP-8.1'
* PHP-8.1:
  Use ASCII lower case for misc case folding
2021-09-24 09:23:18 +02: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
Máté Kocsis
d824eaee33
Merge branch 'PHP-8.1'
* PHP-8.1:
  Add more specific array return type hints for various extensions - part 3
2021-09-06 12:27:57 +02:00
Máté Kocsis
6a47831e6e
Add more specific array return type hints for various extensions - part 3 (#7467) 2021-09-06 12:27:28 +02:00
Nikita Popov
218fd03532 Fix some more CLEANUP sections 2021-09-03 14:10:40 +02:00
Máté Kocsis
2378f35787
Use single line phpdoc in stubs where possible 2021-07-20 13:16:56 +02:00
Joe Watkins
570d9b63e9
Not serializable flag permeation 2021-07-20 12:28:35 +02:00
Máté Kocsis
b382883696
Indent stubs inside global namespace blocks (#7261) 2021-07-20 10:23:58 +02:00
Patrick Allaert
ac18dd0dc7 Prefer EXPECT over EXPECTF 2021-06-29 17:13:02 +02:00
Nikita Popov
849a34e490 Use EXTENSIONS section for ldap 2021-06-14 10:41:33 +02:00
Nikita Popov
748568268a Make LDAPCONF test work on windows
Rather than using putenv(), use the ENV section. This also
required adding {PWD} support for it.
2021-06-14 10:40:18 +02:00
Nikita Popov
7485978339
Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +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
465aa1d38f
Fix ldap_next_entry() parameter name 2021-03-16 09:31:46 +01:00
Máté Kocsis
b03438ba3a
Fix crash in LDAP search functions during argument validation 2021-03-16 09:31:37 +01:00
Máté Kocsis
cad66533f0
Generate class entries from stubs for ldap, libxml, mbstring and mysqli
Closes GH-6684
2021-02-16 14:46:19 +01:00
Nikita Popov
b10416a652 Deprecate passing null to non-nullable arg of internal function
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.

This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)

RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg

Closes GH-6475.
2021-02-11 21:46:13 +01:00
Christoph M. Becker
a4992cbf66 Merge branch 'PHP-8.0'
* PHP-8.0:
  ldap_search() and friends can return array
2021-01-19 10:35:35 +01:00
Christoph M. Becker
f33105dcb6 ldap_search() and friends can return array
See the description of <https://www.php.net/ldap-search>, and also the
implementation.

Closes GH-6620.
2021-01-19 10:35:17 +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
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