1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Commit Graph

565 Commits

Author SHA1 Message Date
Côme Chilliet 79cfa55cae Added a test for assertion control 2017-09-21 10:05:40 +02:00
Côme Chilliet 6d3a914641 Added a test for PROXY_AUTHZ control on ldap_exop 2017-09-21 10:05:40 +02:00
Côme Chilliet 02bd89a552 Added support for assert control value encoding 2017-09-21 10:05:40 +02:00
Côme Chilliet 5691d8bf49 Added controls support to ldap_exop 2017-09-21 10:05:40 +02:00
Côme Chilliet 8de071e0f7 Added controls support to ldap_search, ldap_list and ldap_read. 2017-09-21 10:05:40 +02:00
Côme Chilliet 5ccb31e49e Added controls support to ldap_parse_result and ldap_exop_passwd
Known controls are parsed to and from associative arrays.
Only ppolicy and paged results are implemented for now.
2017-09-21 10:05:40 +02:00
Côme Chilliet 26ccaa39b3 Merge branch 'PHP-7.2'
* PHP-7.2:
  Removing client controls attribute from ldap_exop signature
2017-09-07 16:33:42 +02:00
Côme Chilliet e67379399a Removing client controls attribute from ldap_exop signature
Client controls will not get implemented in php-ldap as
 they are specific to each client ldap lib and most of the
 time unused any way. (servers controls on the other end are used
 and will get implemented)
2017-09-07 16:31:03 +02:00
Côme Chilliet 28630f7920 Fixed an error in ldap_exop introduced by last commit 2017-09-06 15:05:27 +02:00
Côme Chilliet 3fdeb27739 Improving a bit code quality in ldap_exop function
Ideas from https://github.com/sgolemon/php-src/commit/5b3f4c2fb9e529880ec74e61f9e27aa41ec7f023
The same can be done for the rest of the code,
 and synchronous/asynchronous version should be merged when implementing
 controls.
2017-09-06 12:56:51 +02:00
Côme Chilliet f3f25a8446 Merge branch 'PHP-7.2'
* PHP-7.2:
  Added controls parameters to ldap_exop so that control support can be added later
2017-08-04 18:11:52 +02:00
Côme Chilliet aa0e402acf Added controls parameters to ldap_exop so that control support can be added later 2017-08-04 18:10:49 +02:00
Côme Chilliet afef1fe778 Fixed ldap tests when ldap server hash out passwords 2017-07-26 17:34:18 +02:00
Côme Chilliet d51c4cd64f Fixed test for ldap_set_option server controls with empty array 2017-07-26 17:21:27 +02:00
Anatol Belski 572429473d Fix datatypes and warnings
Needs more testing yet.

use size_t

add range check and fix warning

more size_t fixes
2017-07-25 19:03:33 +02:00
Côme Chilliet 5e56d050e5 Added ldap_exop_refresh helper for EXOP REFRESH operation on dds overlay
ldap_exop_refresh(resource link, string dn, int ttl)
Returns FALSE on failure, newttl on success
2017-07-20 16:16:59 +02:00
Côme Chilliet a3b42ea96b Using LDAP_CONTROL_MANAGEDSAIT constant in ldap tests instead of string oid 2017-07-20 12:37:44 +02:00
Côme Chilliet a148ee8c7c Fixed removing all controls by passing an empty array to ldap_set_option 2017-07-11 16:18:33 +02:00
Côme Chilliet ed8bfcc6ea Small fix in ext/ldap, Moved vars definitions to the beginning of the block using them 2017-07-10 11:33:08 +02:00
Côme Chilliet 274d84139b Added constants for known ldap controls OID and tests for ldap_get/set_option for controls
Also fixed existing tests which were expecting ldap_get_option to fail on controls
2017-07-05 16:41:52 +02:00
Côme Chilliet 3a09c1246c Added support for controls to ldap_get_option 2017-07-05 16:41:52 +02:00
Côme Chilliet 209c9ba384 Test ldap_exop_passwd with less parameters to be sure it works 2017-07-04 10:17:41 +02:00
Côme Chilliet 3207747b9e Changed API to avoid using passing result by reference
See discussion on internals ML
2017-07-04 10:03:27 +02:00
Côme Chilliet 13062efd02 Removed unused variables left over by LDAP EXOP patch 2017-07-03 12:23:34 +02:00
Côme Chilliet e05d230e52 Removed TSRMLS_CC instances left over by LDAP EXOP patch 2017-07-03 12:08:24 +02:00
Côme Chilliet bda80aa332 Swapped position of retoid and retdata as retoid is almost never used 2017-07-03 10:58:13 +02:00
Côme Chilliet e9001cab46 Removed two step syntax for EXOP helpers, one call workflow is enough 2017-07-03 10:58:13 +02:00
Côme Chilliet 5020325a6f Improved ldap_exop test to encode&decode a passwd EXOP to test sending/recieving data 2017-07-03 10:58:13 +02:00
Côme Chilliet 413e9c84f6 Removed TODOs regarding implementing passwd and whoami exops based on ldap_exop 2017-07-03 10:58:13 +02:00
Côme Chilliet 9aa99cc34c Added constants for standard EXOPs 2017-07-03 10:58:13 +02:00
Côme Chilliet 4652c46245 Removed ldap_refresh function as I’m not sure how to fix/use/test it 2017-07-03 10:58:13 +02:00
Côme Chilliet e832ce4b22 Fixed ldap_exop and ldap_parse_exop. Only tested them for whoami exop. (see test file) 2017-07-03 10:58:13 +02:00
Côme Chilliet 28530b2f1c Fixed ldap_parse_exop_whoami and ldap_parse_exop_passwd and added test for them 2017-07-03 10:58:13 +02:00
Côme Chilliet fdafd68419 Fixed ldap_exop_whoami and added a test for it 2017-07-03 10:58:12 +02:00
Côme Chilliet ae76c8ba2c Fixed ldap_exop_passwd and added tests for it 2017-07-03 10:58:12 +02:00
Côme Chilliet def09c7cab Fixed building errors in LDAP EXOP 2017-07-03 10:58:12 +02:00
Côme Chilliet a0920f2822 Added EXOP features based on patch from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/php-ldap/files/ldap-ctrl-exop56.patch 2017-07-03 10:58:12 +02:00
Nikita Popov 035a27cbc6 Only compute callback name in error cases
Mostly the callback name is only used to report an error. Try to
avoid calculating it if no error occurred.
2017-06-25 18:45:59 +02:00
David Caldwell aef09760d1 ext/ldap/test: Test that ldap_connect() uses defaults from ldap.conf (openldap) 2017-05-30 17:30:32 +02:00
David Caldwell 747e93eabc ext/ldap: Allow default host from ldap.conf to work.
This fixes an regression introduced in
e7af0fe1eb. Previously, calling
ldap_connect() with no parameters would pass NULL to ldap_init(),
which causes it to use the default host specified in
/etc/ldap/ldap.conf (on Ubuntu).

When the code changed to use ldap_initialize(), it initialized a uri,
even if there were no parameters passed to ldap_connect(). Because of
this, there's no way to pass a NULL into ldap_initialize(), making it
impossible to use the default uri from ldap.conf.

This commit bypasses the uri creation when there is no host argument,
passing on a NULL to ldap_initialize() which restores the old PHP 5.5
behavior.
2017-05-30 17:30:32 +02:00
Côme Bernigaud 1bb295e659 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  ext/ldap/test: Test that ldap_connect() uses defaults from ldap.conf (openldap)
  ext/ldap: Allow default host from ldap.conf to work.

Conflicts:
	ext/ldap/ldap.c
2017-05-30 16:48:16 +02:00
David Caldwell 49d1cdc393 ext/ldap/test: Test that ldap_connect() uses defaults from ldap.conf (openldap) 2017-05-25 21:27:11 +00:00
David Caldwell d51b8f915f ext/ldap: Allow default host from ldap.conf to work.
This fixes an regression introduced in
e7af0fe1eb. Previously, calling
ldap_connect() with no parameters would pass NULL to ldap_init(),
which causes it to use the default host specified in
/etc/ldap/ldap.conf (on Ubuntu).

When the code changed to use ldap_initialize(), it initialized a uri,
even if there were no parameters passed to ldap_connect(). Because of
this, there's no way to pass a NULL into ldap_initialize(), making it
impossible to use the default uri from ldap.conf.

This commit bypasses the uri creation when there is no host argument,
passing on a NULL to ldap_initialize() which restores the old PHP 5.5
behavior.
2017-05-25 00:47:11 +00:00
Xinchen Hui 0311dc8697 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed another part in ldap (bug #73933)
2017-01-19 12:24:04 +08:00
Xinchen Hui 5e09031144 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed another part in ldap (bug #73933)
2017-01-19 12:23:56 +08:00
Xinchen Hui cad2598fcb Fixed another part in ldap (bug #73933) 2017-01-19 12:23:23 +08:00
Xinchen Hui fafce65a05 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #73933 (error/segfault with ldap_mod_replace and opcache)
2017-01-17 15:35:46 +08:00
Xinchen Hui e180e45a18 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73933 (error/segfault with ldap_mod_replace and opcache)
2017-01-17 15:35:06 +08:00
Xinchen Hui b28c2e20ca Fixed bug #73933 (error/segfault with ldap_mod_replace and opcache) 2017-01-17 15:34:19 +08:00
Anatol Belski 97ac819c2b Merge branch 'PHP-7.1'
* PHP-7.1:
  move various places to the centralized OpenSSL setup routine
  use the new API for opaque symbol in OpenSSL 1.1.x
  implement basic config support for OpenSSL 1.1.x
2017-01-08 00:39:53 +01:00