summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space available ↵Dmitry Stogov2021-03-101-2/+2
| | | | for static Thread Local Storage)
* Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-082-0/+86
|\ | | | | | | | | * PHP-7.4: Fix #51903: simplexml_load_file() doesn't use HTTP headers
| * Fix #51903: simplexml_load_file() doesn't use HTTP headersChristoph M. Becker2021-03-082-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `encoding` attribute of the XML declaration is optional; it is good practice to use external encoding information where available if it is missing. Thus, we check for `charset` info of `Content-Type` headers, and see whether the encoding is supported. We cater to trailing parameters and quoted-strings, but not to escaped backslashes and quotes in quoted-strings, since no known character encoding contains these anyway. Co-authored-by: Michael Wallner <mike@php.net> Closes GH-6747.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-082-1/+42
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80838: HTTP wrapper waits for HTTP 1 response after HTTP 101
| * Fix #80838: HTTP wrapper waits for HTTP 1 response after HTTP 101manuel2021-03-082-1/+42
| | | | | | | | | | | | Don't wait for further responses after a HTTP 101 (Switching Protocols) response Closes GH-6730.
* | Add supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be ↵David Carlier2021-03-051-0/+3
| | | | | | | | | | | | applied in addition. Closes GH-6738.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-051-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Print error code if CreateMutex() fails
| * Print error code if CreateMutex() failsChristoph M. Becker2021-03-051-1/+1
| | | | | | | | | | | | | | | | | | This issue came up recently in a bug report[1]; without the error code, users can barely guess why the function failed. [1] <https://bugs.php.net/80812> Closes GH-6745.
* | Fix ASAN warning (Zend/zend_string.h:165:2: runtime error: null pointer ↵Dmitry Stogov2021-03-041-1/+5
| | | | | | | | passed as argument 2 of memcpy(), which is declared to never be null)
* | Fix #80825: ZipArchive::isCompressionMethodSupported does not existChristoph M. Becker2021-03-031-1/+1
| | | | | | | | | | `HAVE_METHOD_SUPPORTED` should have been defined after we updated to libzip 1.7.1 months ago.
* | Fix test wrt. server.inc changesChristoph M. Becker2021-03-031-3/+3
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-032-13/+31
|\ \ | |/ | | | | | | * PHP-7.4: Fix #78719: http wrapper silently ignores long Location headers
| * Fix #78719: http wrapper silently ignores long Location headersChristoph M. Becker2021-03-032-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | When opening HTTP streams, and reading the headers, we currently discard header lines longer than `HTTP_HEADER_BLOCK_SIZE` (1024 bytes). While this is not generally forbidden by RFC 7230, section 3.2.5, it is not generally allowed either, since that may change the "message framing or response semantics". We thus fix this by allowing arbitrarily long header lines. Closes GH-6720.
* | Fixed bug #80802: (zend_jit_fetch_indirect_var assert failure with tracing JIT)Dmitry Stogov2021-03-012-1/+50
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-011-0/+93
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80751: Comma in recipient name breaks email delivery
| * Fix #80751: Comma in recipient name breaks email deliveryChristoph M. Becker2021-03-011-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, `SendText()` simply separates potential email address lists at any comma, disregarding that commas inside a quoted-string do not delimit addresses. We fix that by introducing an own variant of `strtok_r()` which caters to quoted-strings. We also make `FormatEmailAddress()` aware of quoted strings. We do not cater to email address comments, and potentially other quirks of RFC 5322 email addresses, but catering to quoted-strings is supposed to solve almost all practical use cases. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6735.
| * Fixed bug #80805Nikita Popov2021-03-012-4/+33
| | | | | | | | | | | | Handle missing result_var in binary_op_result_type. (cherry picked from commit 8446e2827585c37d0739f8d44fa8d359cbbb6551)
* | Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGEGeorge Peter Banyard2021-02-275-4/+131
| | | | | | | | | | | | | | | | This also affected imap_reopen(). Add a supplementary test that the CL_EXPUNGE flag does have the intended effect. Closes GH-6732
* | Merge branch 'PHP-7.4' into PHP-8.0Felipe Pena2021-02-251-0/+9
|\ \ | |/
| * Fix memleak on ReflectionFunction and ReflectionGenerator classes when ↵Felipe Pena2021-02-251-0/+9
| | | | | | | | calling __construct after instantiation
* | Merge branch 'PHP-7.4' into PHP-8.0Remi Collet2021-02-251-1/+2
|\ \ | |/ | | | | | | * PHP-7.4: skip test with openssl < 1.1.0
| * skip test with openssl < 1.1.0Remi Collet2021-02-251-1/+2
| | | | | | | | | | The test fails, but without any crash (this test is designed to catch a crash)
* | crc32 module, clang spurious warning removal.David CARLIER2021-02-251-3/+7
| | | | | | | | Closes GH-6725.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-251-2/+2
|\ \ | |/ | | | | | | * PHP-7.4: mysqlnd pam fix test error message
| * mysqlnd pam fix test error messageDaniel Black2021-02-251-2/+2
| | | | | | | | Closes GH-6727.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-242-2/+2
|\ \ | |/ | | | | | | * PHP-7.4: Fix potential file collision in dom tests
| * Fix potential file collision in dom testsNikita Popov2021-02-242-2/+2
| |
* | Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)Dmitry Stogov2021-02-242-4/+31
| |
* | Fixed bug #80786Nikita Popov2021-02-232-10/+36
| | | | | | | | | | | | | | Don't use r0 as temporary register in math_double_long if it is already used for a memory result. This was already done in one branch, but not the other.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-223-3/+66
|\ \ | |/ | | | | | | * PHP-7.4: Fix #75776: Flushing streams with compression filter is broken
| * Fix #75776: Flushing streams with compression filter is brokenChristoph M. Becker2021-02-223-3/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, the `bzip2.compress` filter has the same issue as `zlib.deflate` so we port the respective fix[1] to ext/bz2. Second, there is still an issue, if a stream with an attached compression filter is flushed before it is closed, without any writes in between. In that case, the compression is never finalized. We fix this by enforcing a `_php_stream_flush()` with the `closing` flag set in `_php_stream_free()`, whenever a write filter is attached. This call is superfluous for most write filters, but does not hurt, even when it is unnecessary. [1] <http://git.php.net/?p=php-src.git;a=commit;h=20e75329f2adb11dd231852c061926d0e4080929> Closes GH-6703.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-222-1/+17
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI
| * Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLIChristoph M. Becker2021-02-222-1/+17
| | | | | | | | | | | | | | There is no good reason not to show the credits in text based SAPIs, except for brevity. Thus, we suppress the credits from `php -i`. Closes GH-6710.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-223-9/+30
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80774: session_name() problem with backslash
| * Fix #80774: session_name() problem with backslashChristoph M. Becker2021-02-223-9/+30
| | | | | | | | | | | | | | | | | | | | Since we do no longer URL decode cookie names[1], we must not URL encode the session name. We need to prevent broken Set-Cookie headers, by rejecting names which contain invalid characters. [1] <http://git.php.net/?p=php-src.git;a=commit;h=6559fe912661ca5ce5f0eeeb591d928451428ed0> Closes GH-6711.
* | Avoid signed integer overflow in substr()Nikita Popov2021-02-182-2/+12
| | | | | | | | | | | | | | Perform negation after the (size_t) cast rather than before, so as to avoid a signed integer overflow for PHP_INT_MIN. Fixes oss-fuzz #31069.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-172-0/+20
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80763: msgfmt_format() does not accept DateTime references
| * Fix #80763: msgfmt_format() does not accept DateTime referencesChristoph M. Becker2021-02-172-0/+20
| | | | | | | | | | | | `intl_zval_to_millis()` needs to cater to references. Closes GH-6707.
* | Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in ↵Dmitry Stogov2021-02-173-12/+100
| | | | | | | | code involving bitshifts)
* | Fixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)Dmitry Stogov2021-02-162-3/+101
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-161-2/+3
|\ \ | |/ | | | | | | * PHP-7.4: Handle incomplete result set metadata more gracefully
| * Handle incomplete result set metadata more gracefullyNikita Popov2021-02-161-2/+3
| | | | | | | | | | | | | | | | Rather than segfaulting because sname is missing lateron, report a FAIL here. As this indicates a server bug, the errors is reported as an out of band warning, rather than a client error. This fixes the PHP side of bug #80713.
* | Mark resource-like objects as non-comparableNikita Popov2021-02-1613-0/+17
| | | | | | | | | | | | | | As these hold on to some internal resource, there can't be two "equal" objects with different identity. Make sure the lack of public properties doesn't result in these being treated as always equal.
* | Fixed bug #80723Nikita Popov2021-02-162-0/+22
| | | | | | | | | | This fixes the issue just for the Socket class. Presumably we'll want to do the same for other "resource" objects.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-162-27/+29
|\ \ | |/ | | | | | | * PHP-7.4: Suppress OpenSSL error on missing optional config
| * Suppress OpenSSL error on missing optional configNikita Popov2021-02-162-27/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | openssl_pkey_new() fetches various options from the config file -- most of these are optional, and not specifying them is not an error condition from the perspective of the user. Unfortunately, the CONF_get_string() API pushes an error when accessing a key that doesn't exist (_CONF_get_string does not, but that is presumably a private API). This commit adds a helper php_openssl_conf_get_string() that automatically clears the error in this case. I've found that OpenSSL occasionally does the same thing internally: https://github.com/openssl/openssl/blob/22040fb790c854cefb04bed98ed38ea6357daf83/apps/req.c#L515-L517 Closes GH-6699.
* | Adapt test case for libcurl 7.75.0+Christoph M. Becker2021-02-161-1/+1
| | | | | | | | | | | | | | libcurl 7.75.0 finally adds support for `gophers://`, i.e. gopher over TLS. The protocol is neither standardized, nor is the protocol registered with IANA, but well, it is there and the test case should cater to that.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-0/+21
|\ \ | |/ | | | | | | * PHP-7.4: Fixed bug #80747
| * Fixed bug #80747Nikita Popov2021-02-152-0/+21
| | | | | | | | If RSA key generation fails, actually report that failure.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-152-7/+51
|\ \ | |/ | | | | | | * PHP-7.4: Fix #78680: mysqlnd pam plugin missing terminating null