summaryrefslogtreecommitdiff
path: root/ext/standard
Commit message (Collapse)AuthorAgeFilesLines
* Remove yearly range from copyright noticeZeev Suraski2019-01-30130-130/+130
|
* Avoid mention of php7 in credits scriptNikita Popov2019-01-282-10/+11
|
* Allow strip_tags with an array of allowed tagnamesAndreas Treichel2019-01-243-31/+56
|
* Disallow PHP startup, in case some ext ext/standard sub-module is not ↵Dmitry Stogov2019-01-241-25/+6
| | | | initialized sucessfully.
* Make more tests run os MacOSGabriel Caruso2019-01-226-22/+3
|
* Remove the "o" serialization formatNikita Popov2019-01-221-11/+0
| | | | | We never generate the "o" format during serialization, so let's not keep this unnecessary attack surface around.
* Merge branch 'PHP-7.3'Anatol Belski2019-01-191-0/+4
|\ | | | | | | | | * PHP-7.3: Skip test on unsuitable build
| * Skip test on unsuitable buildAnatol Belski2019-01-191-0/+4
| | | | | | | | | | | | | | | | | | This test reveals a difference between TS and NTS through all the versions, which is probably too late to fix at this stage of 7.3. While NTS always relies on the system getcwd(), TS uses a fake CWD which might get out of sync when the real dir is deleted. Thus, skip test on unsuitable build. Investigate possibilities to fix this edge case for later versions.
* | Merge branch 'PHP-7.3'Anatol Belski2019-01-191-7/+9
|\ \ | |/ | | | | | | * PHP-7.3: Make test output more reliable
| * Make test output more reliableAnatol Belski2019-01-191-7/+9
| |
* | Merge branch 'PHP-7.3'Anatol Belski2019-01-191-0/+33
|\ \ | |/ | | | | | | * PHP-7.3: Fixed bug #77484 Zend engine crashes when calling realpath in invalid working dir
| * Fixed bug #77484 Zend engine crashes when calling realpath in invalid ↵Anatol Belski2019-01-191-0/+33
| | | | | | | | working dir
* | Merge branch 'PHP-7.3'Nikita Popov2019-01-182-0/+4
|\ \ | |/
| * Add additional no_sanitize_address attributesNikita Popov2019-01-182-0/+4
| | | | | | | | To fix bug #77447 in release mode as well.
* | Merge branch 'PHP-7.3'Nikita Popov2019-01-181-1/+1
|\ \ | |/
| * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-01-181-1/+1
| |\
| | * Fix seeking in php://inputLauri Kenttä2019-01-181-1/+1
| | |
* | | Improved ZEND_TRY_ASSIGN... API to avoid unnecessary double copying and ↵Dmitry Stogov2019-01-181-1/+1
| | | | | | | | | | | | reduce code bloat.
* | | Implement typed propertiesNikita Popov2019-01-1120-197/+415
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Remove unnecessary Z_PARAM_ZVAL_DEREFsNikita Popov2019-01-101-2/+2
| | |
* | | Merge branch 'PHP-7.3'Nikita Popov2019-01-101-0/+14
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-01-101-0/+14
| |\ \ | | |/
| | * Fixed bug #77439Nikita Popov2019-01-101-0/+14
| | |
* | | Merge branch 'PHP-7.3'Stanislav Malyshev2019-01-061-1/+8
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.3: Fix #77367: Negative size parameter in mb_split Fix #77369 - memcpy with negative length via crafted DNS response Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests
| * | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-01-061-0/+7
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.2: Fix #77369 - memcpy with negative length via crafted DNS response Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests
| | * Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-01-061-0/+7
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.1: Fix #77369 - memcpy with negative length via crafted DNS response Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests
| | | * Fix #77369 - memcpy with negative length via crafted DNS responseStanislav Malyshev2019-01-061-0/+7
| | | |
* | | | Fix ZEND_NORMALIZE_BOOL usageNikita Popov2019-01-021-1/+1
| | | | | | | | | | | | | | | | Typo introduced in cdd8368d6f3f000a2e30a6be9976c5539f10fe85.
* | | | Merge branch 'PHP-7.3'Xinchen Hui2019-01-022-4/+21
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | * PHP-7.3: Update NEWS Fixed bug #77395 (segfault about array_multisort)
| * | | Merge branch 'PHP-7.2' into PHP-7.3Xinchen Hui2019-01-022-4/+21
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.2: Fixed bug #77395 (segfault about array_multisort)
| | * | Fixed bug #77395 (segfault about array_multisort)Xinchen Hui2019-01-022-4/+21
| | | |
* | | | Merge branch 'PHP-7.3'Anatol Belski2018-12-291-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.3: Increase timeout for test on AppVeyor
| * | | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-12-291-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.2: Increase timeout for test on AppVeyor
| | * | Increase timeout for test on AppVeyorAnatol Belski2018-12-291-1/+1
| | | |
* | | | Remove preg_options param from pcre_get_compiled_regex()Nikita Popov2018-12-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This parameter is always zero and not necessary to call pcre2_match. I'm leaving the parameter behind on the _ex() variant, so the preg_flags are still accessible in some way.
* | | | Merge branch 'PHP-7.3'Nikita Popov2018-12-261-0/+81
|\ \ \ \ | |/ / /
| * | | Fixed bug #77338Nikita Popov2018-12-261-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set preg_options to 0 in php_pcre_get_compiled_regex(_ex). These options are intended to be passed to pcre2_match. However, we do not have any flags that actually need to be set during matching (all relevant flags are set during compilation), and the preg_flags value is used for PHP-specific flags instead. This parameter should be removed entirely in master to avoid confusion.
* | | | Merge branch 'PHP-7.3'Nikita Popov2018-12-233-1/+15
|\ \ \ \ | |/ / /
| * | | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-12-233-1/+15
| |\ \ \ | | |/ /
| | * | Fix invalid efree in browscapNikita Popov2018-12-233-1/+15
| | | | | | | | | | | | | | | | Related to bug #77338.
* | | | Fixed compilation warningsDmitry Stogov2018-12-191-1/+2
| | | |
* | | | Replace zend_hash_apply... with ZEND_HASH_FOREACH...Dmitry Stogov2018-12-193-95/+94
| | | |
* | | | Allow empty $escape to eschew escaping CSVChristoph M. Becker2018-12-156-26/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Albeit CSV is still a widespread data exchange format, it has never been officially standardized. There exists, however, the “informational” RFC 4180[1] which has no notion of escape characters, but rather defines `escaped` as strings enclosed in double-quotes where contained double-quotes have to be doubled. While this concept is supported by PHP's implementation (`$enclosure`), the `$escape` sometimes interferes, so that `fgetcsv()` is unable to correctly parse externally generated CSV, and `fputcsv()` is sometimes generating non-compliant CSV. Since PHP's `$escape` concept is availble for many years, we cannot drop it for BC reasons (even though many consider it as bug). Instead we allow to pass an empty string as `$escape` parameter to the respective functions, which results in ignoring/omitting any escaping, and as such is more inline with RFC 4180. It is noteworthy that this is almost no userland BC break, since formerly most functions did not accept an empty string, and failed in this case. The only exception was `str_getcsv()` which did accept an empty string, and used a backslash as escape character then (which appears to be unintended behavior, anyway). The changed functions are `fputcsv()`, `fgetcsv()` and `str_getcsv()`, and also the `::setCsvControl()`, `::getCsvControl()`, `::fputcsv()`, and `::fgetcsv()` methods of `SplFileObject`. The implementation also changes the type of the escape parameter of the PHP_APIs `php_fgetcsv()` and `php_fputcsv()` from `char` to `int`, where `PHP_CSV_NO_ESCAPE` means to ignore/omit escaping. The parameter accepts the same values as `isalpha()` and friends, i.e. “the value of which shall be representable as an `unsigned char` or shall equal the value of the macro `EOF`. If the argument has any other value, the behavior is undefined.” This is a subtle BC break, since the character `chr(128)` has the value `-1` if `char` is signed, and so likely would be confused with `EOF` when converted to `int`. We consider this BC break to be acceptable, since it's rather unlikely that anybody uses `chr(128)` as escape character, and it easily can be fixed by casting all `escape` arguments to `unsigned char`. This patch implements the feature requests 38301[2] and 51496[3]. [1] <https://tools.ietf.org/html/rfc4180> [2] <https://bugs.php.net/bug.php?id=38301> [3] <https://bugs.php.net/bug.php?id=51496>
* | | | Fixed memory leaksDmitry Stogov2018-12-133-0/+13
| | | |
* | | | Improve unserialize()Dmitry Stogov2018-12-131-38/+38
| | | |
* | | | Improve unserialize()Dmitry Stogov2018-12-122-8/+22
| | | |
* | | | Split php_array_merge_or_replace_wrapper() into php_array_merge_wrapper() ↵Dmitry Stogov2018-12-111-73/+113
| | | | | | | | | | | | | | | | | | | | | | | | and php_array_replace_wrapper(). Avoid array duplication when merging with an empty array.
* | | | Merge branch 'PHP-7.3'Stanislav Malyshev2018-12-032-1/+12
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.3: Fix null pointer deref in qprint-encode filter (bug #77231)
| * | | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2018-12-032-1/+12
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.2: Fix null pointer deref in qprint-encode filter (bug #77231)
| | * | Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2018-12-032-1/+12
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.1: Fix null pointer deref in qprint-encode filter (bug #77231)