Commit graph

179 commits

Author SHA1 Message Date
Stanislav Malyshev
95ee9efa57 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 22:00:24 -07:00
Stanislav Malyshev
5a18d7a0df Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix tsrm_ls
  Fix #76129 - remove more potential unfiltered outputs for phar
  Fix test
  Fix bug #76248 - Malicious LDAP-Server Response causes Crash
  Fix bug #76249 - fail on invalid sequences
  Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value
  Fix bug #75981: prevent reading beyond buffer start
2018-04-23 21:59:57 -07:00
Stanislav Malyshev
49782c5499 Fix bug #76248 - Malicious LDAP-Server Response causes Crash 2018-04-22 22:01:35 -07:00
Nikita Popov
ad87e2bd6a Merge branch 'PHP-7.2' 2018-03-23 18:57:58 +01:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Gabriel Caruso
b0d3c1bf83 Add and fix SKIPIF sections 2018-02-04 17:26:37 +01:00
Gabriel Caruso
c6c9e71a5b Add missing SKIPIF sections 2018-02-03 13:54:34 +01:00
Côme Chilliet
9a4f3505ff Added support for VLV controls request and response 2017-09-21 10:05:42 +02:00
Côme Chilliet
6ac7d313c8 Added support for SORT controls
On an openldap server you need the sssvlv overlay for these to work
2017-09-21 10:05:42 +02:00
Côme Chilliet
76e9de681a Added skip when control are not supported by the test ldap server 2017-09-21 10:05:42 +02:00
Côme Chilliet
c112b53a60 Added ldap_rename_ext and its test 2017-09-21 10:05:42 +02:00
Côme Chilliet
679442b1d1 Indexing controls by OID when parsing them 2017-09-21 10:05:42 +02:00
Côme Chilliet
9c7666d93a Avoid returning iscritical field when parsing response controls
As stated in RFC4511 Section 4.1.11, this field is always false in
 response controls and only makes sense in request controls
2017-09-21 10:05:42 +02:00
Côme Chilliet
ead53aba54 Added ldap_delete_ext and its test 2017-09-21 10:05:42 +02:00
Côme Chilliet
17e490a2e3 Added ldap_mod_*_ext methods for modification with controls 2017-09-21 10:05:42 +02:00
Côme Chilliet
32b51035be Added ldap_add_ext and preread/postread support and tests 2017-09-21 10:05:42 +02:00
Côme Chilliet
b36342453b Added ldap_bind_ext to pass controls and get result object
ldap_bind_ext allows to pass controls and get result object
 from bind operation
Also added a test for it, pretty basic as tests cannot depend upon
 ppolicy overlay
2017-09-21 10:05:41 +02:00
Côme Chilliet
3a1ba93066 Added support and test for LDAP_CONTROL_VALUESRETURNFILTER 2017-09-21 10:05:41 +02:00
Côme Chilliet
b5ca0c1c78 Removed client controls alltogether
Client controls are ldap client lib specific and all the one
 I could find are ignoring client controls anyway.
2017-09-21 10:05:41 +02:00
Côme Chilliet
d377edb884 Fixed ldap_exop test since rebase remove client controls 2017-09-21 10:05:41 +02:00
Côme Chilliet
81b27abac0 Added support for controls in ldap_modify_batch 2017-09-21 10:05:41 +02:00
Côme Chilliet
2b52cb74da Added controls support to ldap_compare
Note: for functions like ldap_compare, ldap_delete, ldap_modify,
 a way to get the result object back will need to be added
 so that controls returned by the server may be analyzed.
2017-09-21 10:05:41 +02:00
Côme Chilliet
82cc72a3ba Added controls support to ldap_rename 2017-09-21 10:05:41 +02:00
Côme Chilliet
59f32408f8 Using new control syntax for MANAGEDSAIT control when deleting references 2017-09-21 10:05:41 +02:00
Côme Chilliet
c8572da183 Fixed wrong argument number error tests 2017-09-21 10:05:41 +02:00
Côme Chilliet
93fbbbf5a6 Added controls support to ldap_delete 2017-09-21 10:05:40 +02:00
Côme Chilliet
5ee0fc9b56 Added support for controls in ldap_add, ldap_modify, ldap_mod_*
Also added workaround for a bug in ldap_create_assertion_control_value
Made sure failed control creation aborts the operation
And added test for assertion control on ldap_modify
2017-09-21 10:05:40 +02:00
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
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
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
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
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
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
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
9aa99cc34c Added constants for standard EXOPs 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