1
0
mirror of https://github.com/php/php-src.git synced 2026-04-06 23:53:30 +02:00
Commit Graph

115395 Commits

Author SHA1 Message Date
Nikita Popov
fcabe693ba Fixed bug #81494
Use the proper error reporting mechanism rather than throwing a
warning. This requires something of a hack because we don't have
direct access to the connection object at this point.
2021-10-08 15:00:10 +02:00
Derick Rethans
9733d49e14 Remove now superfluous tests due to changes in tzdata 2021-10-08 13:51:21 +01:00
Derick Rethans
bcc103a402 Merge branch 'PHP-7.3' into PHP-7.4 2021-10-08 13:13:05 +01:00
Derick Rethans
32c0850b4a Revert "Updated to version 2021.3 (2021c)"
This reverts commit e81554c6e6.
2021-10-08 13:12:50 +01:00
Derick Rethans
8a61f1ece6 Updated to version 2021.3 (2021c) 2021-10-08 12:54:52 +01:00
Derick Rethans
760475b43a Empty merge 2021-10-08 12:54:51 +01:00
Derick Rethans
e81554c6e6 Updated to version 2021.3 (2021c) 2021-10-08 12:54:50 +01:00
Nikita Popov
c0cbf3a6eb Fix failing PDO PgSQL test
This now prints an additional

> CONTEXT:  unnamed portal parameter $1 = ''

on azure, presumably as a result of a version update or configuration
change. Strip this additional line from the error info, the same as
already done in one other place in the test.
2021-10-07 20:10:45 +02:00
Derick Rethans
89dfe49321 Bump config.guess/config.sub in all supported branches to support Apple Silicon 2021-10-07 17:02:39 +01:00
Derick Rethans
cd0c32e7fb Bump config.guess/config.sub in all supported branches to support Apple Silicon 2021-10-07 16:59:00 +01:00
Nikita Popov
1519770288 Fixed bug #54350
Don't allow calling fclose() on the stream while in the user
filter callback. This is basically the same protection as xp_ssl
streams use during callback invocations.

There are more issues in this general area (e.g. stack overflow
on stream_filter_remove), but this addresses freeing the stream
during the filter callback invocation at least.
2021-10-07 11:44:41 +02:00
Derick Rethans
e5d35a3252 Prepare branch for 7.4.26-dev 2021-10-05 17:25:43 +01:00
Matteo Beccati
be36bf5aca Add test for pg_put_line() and pg_end_copy() 2021-10-05 17:43:48 +02:00
Christoph M. Becker
a19f655b84 Revert "Fix #81424: PCRE2 10.35 JIT performance regression"
This reverts commit a2471383fe.

Fixing the performance regression, apparently fixes a functional
regression[1], so we revert for now.

[1] <https://github.com/PhilipHazel/pcre2/issues/21>

Closes GH-7556.
2021-10-05 11:49:04 +02:00
Nikita Popov
4c01bd2ade Disable failing FPM test
Test fails intermittently, e.g.:

https://dev.azure.com/phpazuredevops/PHP/_build/results?buildId=20597&view=ms.vss-test-web.build-test-results-tab&runId=475324&resultId=115501&paneView=debug

Possibly this is because the two requests end up being processed
in sequence and no second process is spawned.
2021-10-04 23:30:14 +02:00
Jakub Zelenka
66a655fdf4 Add the actual test for FPM prod idle timeout test with 6s sleep 2021-10-04 21:54:32 +01:00
Jakub Zelenka
edfb347019 Add FPM prod idle timeout test with 6s sleep 2021-10-04 21:50:57 +01:00
Christoph M. Becker
e0c0de003b Fix #77978: Dirname ending in colon unzips to wrong dir
When making the relative path, we must not stop on a `:\` sequence in
the middle of the filename.  This is only significant on Windows as it
may indicate an absolute filename, but this is already checked at the
beginning of the function.

Note that the bug and this patch affects all systems.  However, on
Windows the file is no longer extracted at all, since Windows NTSF does
not allow filenames containing colons.

Closes GH-7528.
2021-10-04 12:55:34 +02:00
Nikita Popov
69514e6ffb Revert "Add FPM prod idle timeout test"
This reverts commit 08f52b1643.

The newly added test fails.
2021-10-04 10:16:20 +02:00
Stanislav Malyshev
02778cddee [ci skip] Add missing NEWS 2021-10-03 20:42:47 -07:00
Jakub Zelenka
08f52b1643 Add FPM prod idle timeout test 2021-10-02 18:26:18 +01:00
Christoph M. Becker
4d44271415 Fix #81490: ZipArchive::extractTo() may leak memory
We always need to free the CWD state.

Closes GH-7536.
2021-09-30 15:41:05 +02:00
Christoph M. Becker
23e13e2c8f Fix #81475: stream_isatty emits warning with attached stream wrapper
We must not issue warnings, if `show_err` is false.

Closes GH-7513.
2021-09-29 13:44:09 +02:00
Christoph M. Becker
2d6684091f Fix #80663: Recursive SplFixedArray::setSize() may cause double-free
We address the `::setSize(0)` case by setting `array->element = NULL`
and `array->size = 0` before we destroy the elements.

Co-authored-by: Tyson Andre <tyson.andre@uwaterloo.ca>

Closes GH-7503.
2021-09-28 15:48:53 +02:00
Michael Voříšek
2c3dfe5160 Fix gdAlphaMax limit typo
Closes GH-7410.
2021-09-23 23:16:40 +02:00
Christoph M. Becker
f70aae28a9 [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  7.3.32 is next
2021-09-21 13:19:42 +02:00
Christoph M. Becker
f2f40b1cf7 7.3.32 is next 2021-09-21 13:18:08 +02:00
Christoph M. Becker
9732381e5b [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Add missing CVE to NEWS
2021-09-21 13:04:41 +02:00
Christoph M. Becker
96a5b4e43a [ci skip] Add missing CVE to NEWS 2021-09-21 13:02:42 +02:00
Christoph M. Becker
c014e12147 [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Add missing NEWS entry
2021-09-21 11:44:57 +02:00
Christoph M. Becker
bb84722364 [ci skip] Add missing NEWS entry 2021-09-21 11:43:36 +02:00
Christoph M. Becker
806cada48d [ci skip] Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix persistent smart_str allocation
2021-09-21 11:01:51 +02:00
Nikita Popov
549cb4406e Fix persistent smart_str allocation
This would allocate a too small buffer if the first smart_str
allocation is > SMART_STR_START_LEN but <= SMART_STR_START_SIZE.

(cherry picked from commit af8fccee9c)
2021-09-21 10:52:43 +02:00
Stanislav Malyshev
f92bae23ce Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #81420: ZipArchive::extractTo extracts outside of destination
2021-09-20 21:34:57 -07:00
Christoph M. Becker
df2ceac25a Fix #81420: ZipArchive::extractTo extracts outside of destination
We need to properly detect and handle absolute paths in a portable way.
2021-09-20 21:29:24 -07:00
Christoph M. Becker
288c25f7d1 Fix #61700: FILTER_FLAG_IPV6/FILTER_FLAG_NO_PRIV|RES_RANGE failing
It makes no sense to compare IPv6 address ranges as strings; there are
too many different representation possibilities.  Instead, we change
`_php_filter_validate_ipv6()` so that it can calculate the IP address
as integer array.  We do not rely on `inet_pton()` which may not be
available everywhere, at least IPv6 support may not, but rather parse
the IP address manually.  Finally, we compare the integers.

Note that this patch does not fix what we consider as reserved and
private, respectively, but merely tries to keep what we had so far.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-7476.
2021-09-20 17:38:05 +02:00
Anatol Belski
49c9fbbfe2 NEWS: Add note for bug #78987
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-19 16:35:26 +02:00
Anatol Belski
8f75ab0dfc fileinfo: Fix test value for s390x on travis-ci
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-19 16:02:30 +02:00
Anatol Belski
6e0acece68 fileinfo: Capture more sizes for test as delivered by travis-ci
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 23:16:38 +02:00
Anatol Belski
e56435c86d fileinfo: Capture more sizes for test as delivered by AppVeyor
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 23:06:57 +02:00
Anatol Belski
0208374ad4 fileinfo: Adjust value in test
Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 22:51:08 +02:00
Anatol Belski
fa96c7e000 fileinfo: Fixed bug #78987 High memory usage during encoding detection
The default buffer size for the encoding detection is set to 64K.

Signed-off-by: Anatol Belski <ab@php.net>
2021-09-18 21:00:30 +02:00
Christoph M. Becker
fac3fbcb07 Fix OOB read due to timezone_open() with 5 digit offset
This has been reported as bug #78984, and is generally and properly
fixed as of timelib 2020.3 (PHP-8.0).  However, it is not fixed in
PHP-7.4, where the test results in an OOB read, and an unterminated
C string when calling `::getName()`.  Therefore, we apply a minimal
fix which just avoids this dangerous behavior.
2021-09-17 13:18:51 +02:00
Nikita Popov
af8fccee9c Fix persistent smart_str allocation
This would allocate a too small buffer if the first smart_str
allocation is > SMART_STR_START_LEN but <= SMART_STR_START_SIZE.
2021-09-16 16:29:16 +02:00
Aliaksandr Bystry
a9661a5293 Fix #70962: XML_OPTION_SKIP_WHITE strips embedded whitespace
We must never strip embedded whitespace; we only need to skip values
when that option is set, and make sure that we keep BC regarding the
different behavior for "cdata" and "complete" elements (for the former,
the whole element is skipped; for the latter only the "value" key).

We also fix erroneous `int` types which should actually be `size_t`.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-7493.
2021-09-16 12:00:28 +02:00
Dmitry Stogov
0badc7de96 Fixed bug #79576 ("TYPE *" shows unhelpful message when type is not defined) 2021-09-15 14:48:33 +03:00
Tyson Andre
b053192a03 Fix #81429: Handle resizing in SplFixedArray::offsetSet (#7487)
offsetSet did not account for the fact that the array may no longer exist after
the field is overwritten. This fixes that.

Add test of resizing both to the empty array and a smaller array - there should
be no valgrind warnings with a proper fix.

Alternate approach to #7486 (described in https://bugs.php.net/bug.php?id=81429)
2021-09-13 20:59:06 -04:00
Christoph M. Becker
a2471383fe Fix #81424: PCRE2 10.35 JIT performance regression
We backport the respective upstream fix[1] to our bundled pcre2lib.

[1] <dc5f966635>

Closes GH-7484.
2021-09-13 14:34:13 +02:00
Viktor
424c265478 Fix #81433: DOMElement::setIdAttribute() called twice may remove ID
We must only remove the attribute id, if the user requested that.

Closes GH-7482.
2021-09-13 12:11:36 +02:00
Derick Rethans
95a943e2f0 The PHP 7.4 branch is for PHP 7.4.25 now 2021-09-07 17:28:16 +01:00