summaryrefslogtreecommitdiff
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* Fix testStanislav Malyshev2020-03-171-1/+1
|
* Fix bug #79329 - get_headers should not accept \0Stanislav Malyshev2020-03-171-1/+1
|
* Fixed bug #79282Stanislav Malyshev2020-03-172-1/+21
|
* Fix #79283: Segfault in libmagic patch contains a buffer overflowChristoph M. Becker2020-03-173-26/+76
| | | | | To solve this, we properly calculate the required string length upfront instead of allocating an oversized string (`len * 4 + 4`).
* Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflowChristoph M. Becker2020-03-172-1/+15
| | | | We make sure that negative values are properly compared.
* this test needs jsonRemi Collet2020-03-031-0/+2
|
* Fix #79013: Content-Length missing when posting a curlFile with curlChristoph M. Becker2020-03-021-2/+14
| | | | | | | | | | | | | | Unfortunately, some Webservers (e.g. IIS) do not implement the (F)CGI specifications correctly wrt. chunked uploads (i.e. Transfer-encoding: chunked), but instead pass -1 as CONTENT_LENGTH to the CGI application. However, our (F)CFI SAPIs (i.e. cgi and cgi-fcgi) do not support this. Therefore we try to retrieve the stream size in advance and pass it to `curl_mime_data_cb()` to prevent libcurl from doing chunked uploads. This is basically the same approach that `curl_mime_filedata()` implements, except that we are keeping already opened streams open for the `read_cb()`.
* Native Windows support for mysqlnd sha256 authentificationChristoph M. Becker2020-03-022-0/+132
| | | | We implement that on top of Cryptography API: Next Generation (CNG).
* Abstract over crypto operationsChristoph M. Becker2020-03-021-61/+77
|
* Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-022-59/+96
|\ | | | | | | | | * PHP-7.3: Update libmagic.patch
| * Update libmagic.patchChristoph M. Becker2020-03-022-66/+110
| | | | | | | | | | | | | | | | Some commits missed to update the patch file, so we're catching up on this. To generally make this easier, we back-port generate_patch.sh from PHP-7.4, where we now also generate magic.h from magic.h.in.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-021-1/+1
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79333: com_print_typeinfo() leaks memory
| * Fix #79333: com_print_typeinfo() leaks memoryChristoph M. Becker2020-03-021-1/+1
| | | | | | | | | | | | | | | | We have to free the `ansiname`s, regardless of whether they have been put into the hashtable or not. Since bug79299.phpt already shows the leak when run with a leak checker, there is no need for another regression test.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-022-10/+19
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79332: php_istreams are never freed
| * Fix #79332: php_istreams are never freedChristoph M. Becker2020-03-022-10/+19
| | | | | | | | | | | | | | | | | | | | Releasing the `com_dotnet_istream_wrapper` in `istream_destructor()` is pointless, since `istream_destructor()` is only called when the resource is going to be released. This recursion is not a real issue, though, since the resource is never exposed to userland, and has at most refcount 1, so due to well defined unsigned integer underflow, it never is released twice. However, returning early in this case causes a memory leak which needs to be fixed.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-02-281-0/+34
|\ \ | |/ | | | | | | * PHP-7.3: Fixed bug #79062
| * Fixed bug #79062Nikita Popov2020-02-281-0/+34
| | | | | | | | Back up the doc comment when performing heredoc scanahead.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-281-10/+6
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79311: enchant_dict_suggest() fails on big endian architecture
| * Fix #79311: enchant_dict_suggest() fails on big endian architectureChristoph M. Becker2020-02-281-10/+6
| | | | | | | | | | | | | | | | | | | | For obvious reasons, we must not assign a `size_t` value to an `int` variable using memcpy(). However, there is actually no need for the intermediate `n_sugg_st` here, if we use the proper types in the first place. A regression test is not necessary, because dict_suggest.phpt already exhibits the erroneous behavior on big endian architectures.
* | Try to fix msvc buildNikita Popov2020-02-281-1/+2
| |
* | Fixed bug #79252Nikita Popov2020-02-281-0/+2
| |
* | fix testRemi Collet2020-02-281-1/+1
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Remi Collet2020-02-282-2/+14
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79315 ZipArchive::addFile doesn't honor start/length parameters
| * Fix #79315 ZipArchive::addFile doesn't honor start/length parametersRemi Collet2020-02-282-1/+13
| |
* | Use type-checked ref assignment in UConverterNikita Popov2020-02-281-5/+2
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2020-02-271-2/+2
|\ \ | |/ | | | | | | * PHP-7.3: Fixed incorrect overflow detection
| * Fixed incorrect overflow detectionDmitry Stogov2020-02-271-2/+2
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-271-1/+1
|\ \ | |/ | | | | | | * PHP-7.3: Fix #64032: mysqli reports different client_version
| * Fix #64032: mysqli reports different client_versionChristoph M. Becker2020-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | While `mysqli_get_client_version()` calls `mysql_get_client_version()` to retrieve the client version, `mysql::$client_version` is initialized to `MYSQL_VERSION_ID`. Both should match though, and since the former is the more useful information, we fix `mysql::$client_version`. We do not add a regression test, because it would usually succeed anyway, and we already have several tests with respective `assert()`s.
* | Add skipif for argon2id in testNikita Popov2020-02-241-0/+1
| | | | | | | | | | If argon2i is provided by libargon, then argon2id may not be available here.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-02-242-3/+40
|\ \ | |/ | | | | | | * PHP-7.3: Don't treat any WS as start of header
| * Don't treat any WS as start of headerNikita Popov2020-02-242-3/+40
| | | | | | | | | | Check that the header occurs after \n, not other whitespace characters.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-02-241-62/+25
|\ \ | |/ | | | | | | * PHP-7.3: Reduce code duplication in HTTP header checks
| * Reduce code duplication in HTTP header checksNikita Popov2020-02-241-62/+25
| |
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-02-242-28/+102
|\ \ | |/ | | | | | | * PHP-7.3: Fixes #79265: Improper injection of Host header when using fopen for http requests
| * Fixes #79265: Improper injection of Host header when using fopen for http ↵Miguel Xavier Penha Neto2020-02-242-28/+102
| | | | | | | | | | | | | | requests Check all occurrences of the string "host:" (and other headers), not just the first one.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-232-1/+21
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79299: com_print_typeinfo prints duplicate variables
| * Fix #79299: com_print_typeinfo prints duplicate variablesChristoph M. Becker2020-02-232-1/+21
| | | | | | | | | | | | | | `lastid` has to retain its value during the traversal, so we move it to an outer scope. Patch contributed by Litiano Moura.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-213-5/+36
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79294: ::columnType() may fail after SQLite3Stmt::reset()
| * Fix #79294: ::columnType() may fail after SQLite3Stmt::reset()Christoph M. Becker2020-02-213-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix for feature request #53466 did not properly handle resetting of the corresponding statement; the problem with this is that the statement does not know about its result sets. But even if we could fix this, the `complete` handling still appears to be brittle, since the `sqlite3_column_type()`docs[1] state: | If the SQL statement does not currently point to a valid row, or if | the column index is out of range, the result is undefined. Fortunately, we can use `sqlite3_data_count()` instead, since[2]: | If prepared statement P does not have results ready to return (via | calls to the sqlite3_column() family of interfaces) then | sqlite3_data_count(P) returns 0. Thus, we guard `SQLite3::columnType()` with `sqlite3_data_count()`, and completely drop updating the `php_sqlite3_result_object.complete` field, but keep it for ABI BC purposes. [1] <https://www.sqlite.org/c3ref/column_blob.html> [2] <https://www.sqlite.org/c3ref/data_count.html>
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-211-0/+20
|\ \ | |/ | | | | | | * PHP-7.3: Add test for bug #78569
| * Add test for bug #78569Christoph M. Becker2020-02-211-0/+20
| |
* | Don't use VLA in mysqlnd authNikita Popov2020-02-182-9/+8
| | | | | | | | | | We use alloca instead of VLA. This should also allow building this code on Windows.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-172-6/+21
|\ \ | |/ | | | | | | * PHP-7.3: Fix #79038: PDOStatement::nextRowset() leaks column values
| * Fix #79038: PDOStatement::nextRowset() leaks column valuesChristoph M. Becker2020-02-172-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly, we must not rely on `stmt->column_count` when freeing the driver specific column values, but rather store the column count in the driver data. Since the column count is a `short`, 16 bit are sufficient, so we can store it in reserved bits of `pdo_odbc_stmt`. Furthermore, we must not allocate new column value storage when the statement is not executed, but rather when the column value storage has not been allocated. Finally, we have to introduce a driver specific `cursor_closer` to avoid that `::closeCursor()` calls `odbc_stmt_next_rowset()` which then frees the column value storage, because it may be still needed for bound columns.
| * Fix # 79171: heap-buffer-overflow in phar_extract_fileChristoph M. Becker2020-02-171-1/+1
| | | | | | | | We must not access memory outside of the allocated buffer.
| * Fix bug #79082 - Files added to tar with Phar::buildFromIterator have ↵Stanislav Malyshev2020-02-174-0/+65
| | | | | | | | all-access permissions
| * Fix bug #79221 - Null Pointer Dereference in PHP Session Upload ProgressStanislav Malyshev2020-02-172-4/+51
| |
* | Create a new console for each test worker on WindowsChristoph M. Becker2020-02-172-4/+11
| | | | | | | | | | | | | | | | | | | | | | The primary motivation to have each test worker running its own console is to allow the windows_mb_path tests to run in parallel. A nice side effect is that this also prevents changing the code page of the tester's console window (which can even cause its font to be changed). To be able to do so, we introduce the `create_new_console` option for `proc_open()`, which might occasionally be useful for other purposes than testing.
* | Disable instantiation of zero size FFI\CData objectsDmitry Stogov2020-02-174-4/+14
| |