Nikita Popov
98457b6d60
Fix some leaks in ldap
...
The result of zval_get_string() needs to be released. In some places
where it is inconvenient to manage, I went back to convert_to_string.
It is safe in those places due to existing array separations.
Also fix a preexisting leak when getting controls, the previous
value was not destroyed.
2019-06-14 11:11:24 +02:00
Côme Chilliet
890e846d85
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Some more string conversion handling, fixing bug #77958
Avoid converting zval when not needed
2019-06-13 22:15:41 +02:00
Côme Chilliet
9684d5f282
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Some more string conversion handling, fixing bug #77958
Avoid converting zval when not needed
2019-06-13 22:15:13 +02:00
Côme Chilliet
5d2fe48785
Some more string conversion handling, fixing bug #77958
2019-06-13 22:12:34 +02:00
Côme Chilliet
c219d8d5c2
Avoid converting zval when not needed
...
Also added exception checks so that exception from __toString are
correctly handled in the future
2019-06-13 20:58:45 +02:00
Nikita Popov
466666c616
Merge branch 'PHP-7.4'
2019-06-11 17:12:33 +02:00
Hugh McMaster
9d61036651
ext/ldap: Use PKG_CHECK_MODULES to detect the libsasl2 library
2019-06-11 17:11:53 +02:00
Dmitry Stogov
e188e4170f
Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference
2019-04-24 18:28:29 +03:00
Dmitry Stogov
2e4686b566
Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference
2019-04-24 18:16:47 +03:00
Dmitry Stogov
34db07567d
Use ZEND_TRA_ASSIGN_REF_... macros for by reference arguments of internal functions.
2019-04-24 16:14:48 +03:00
Côme Chilliet
9d38510ab4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Updated NEWS
Fix a NULL dereferencing crash in php-ldap
2019-04-15 10:21:27 +02:00
Côme Chilliet
f31435b855
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Updated NEWS
Fix a NULL dereferencing crash in php-ldap
2019-04-15 10:20:12 +02:00
Côme Chilliet
ea0f26420d
Fix a NULL dereferencing crash in php-ldap
...
This happens when parsing a control response to a VLV request which does
not contain a "context" string.
See bug #77869
2019-04-15 10:16:29 +02:00
Dmitry Stogov
5f09db3073
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Switch to use ZTS cache
2019-03-12 14:17:14 +03:00
Dmitry Stogov
f1b306fe11
Switch to use ZTS cache
2019-03-12 14:15:47 +03:00
Côme Chilliet
f0ddc93f46
Removed ldap_sort and LDAP_DEPRECATED build flag
...
ldap_sort was deprecated in PHP7, it is now removed.
This allows removing the LDAP_DEPRECATED flag when building against
openldap.
2019-02-04 13:10:05 +01:00
Côme Chilliet
d93ce17959
Mark ldap_control_paged_result and ldap_control_paged_result_response as deprecated
...
These functions have serious limitations and may confuse users.
Same operations can be done using the new ldap control system in search
operations.
2019-02-04 12:20:51 +01:00
Peter Kokot
92ac598aab
Remove local variables
...
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70
Remove yearly range from copyright notice
2019-01-30 11:03:12 +02:00
Nikita Popov
e219ec144e
Implement typed properties
...
RFC: https://wiki.php.net/rfc/typed_properties_v2
This is a squash of PR #3734 , which is a squash of PR #3313 .
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Zeev Suraski
9afce019e0
Future-proof email addresses
2018-11-01 18:35:32 +02:00
Zeev Suraski
67e0138c0d
Future-proof email addresses...
2018-11-01 18:30:28 +02:00
Nikita Popov
1d0252a1c0
Remove IS_EXT_MODULE defines
...
I'm not sure what this was used for, but it doesn't look to be
relevant anymore.
2018-09-16 11:09:51 +02:00
Gabriel Caruso
8ca1f47a7a
Use variables that already received ZEND_NUM_ARGS()
2018-07-22 15:54:00 -03:00
Dmitry Stogov
265c3ed6cf
Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks.
2018-07-05 10:57:49 +03:00
Dmitry Stogov
4a475a4976
Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
...
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Peter Kokot
cb64696ca6
Normalize the ldap extension version in phpinfo output
...
This patch normalizes the phpinfo output for the ldap extension and
removes the displayed Git attribute ident blob object name.
2018-06-04 17:06:41 +02:00
Dmitry Stogov
5eb1f92f31
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
2018-05-28 16:27:12 +03:00
Stanislav Malyshev
99f1d904a0
Merge branch 'PHP-7.2'
...
* PHP-7.2:
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:04:22 -07:00
Stanislav Malyshev
4c06d929c0
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
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:03:33 -07:00
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
Gabriel Caruso
a2933e9ebb
Fix some compile results warnings
2018-02-18 16:22:31 +01:00
Gabriel Caruso
a5f1a585e6
Removed unused variables
2018-02-11 22:46:33 +01:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49
year++
2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7
year++
2018-01-02 12:53:31 +08:00
Dmitry Stogov
9e709e2fa0
Move constants into read-only data segment
2017-12-14 18:43:44 +03:00
Dmitry Stogov
6a9d2b2190
Cleanup type conversion
2017-12-07 19:24:55 +03: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
def30dbde2
Avoid memory leak when creating paged control value
2017-09-21 10:05:42 +02:00
Côme Chilliet
d76d57b887
Fixed ifdef for VLV controls (copy/paste error)
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
d8a7214d8c
Fixed ldap_parse_result comment
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