summaryrefslogtreecommitdiff
path: root/main
Commit message (Collapse)AuthorAgeFilesLines
* Update versions for PHP 8.0.2php-8.0.2Gabriel Caruso2021-02-021-2/+2
|
* Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-01-193-4/+18
|\ | | | | | | | | * PHP-7.4: Fixed bug #42560
| * Fixed bug #42560sj-i2021-01-193-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | Check open_basedir after the fallback to the system's temporary directory in tempnam(). In order to preserve the current behavior of upload_tmp_dir (do not check explicitly specified dir, but check fallback), new flags are added to check open_basedir for explicit dir and for fallback. Closes GH-6526.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-12-231-1/+2
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80384: limit read buffer size
| * Fix #80384: limit read buffer sizeAdam Seitz2020-12-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In the case of a stream with no filters, php_stream_fill_read_buffer only reads stream->chunk_size into the read buffer. If the stream has filters attached, it could unnecessarily buffer a large amount of data. With this change, php_stream_fill_read_buffer only proceeds until either the requested size or stream->chunk_size is available in the read buffer. Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> Closes GH-6444.
* | Next is 8.0.2Gabriel Caruso2020-12-151-3/+3
| |
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-12-081-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Fix #77069: stream filter loses final block of data
| * Fix #77069: stream filter loses final block of dataChristoph M. Becker2020-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading from a stream may return greater than zero, but nonetheless the stream's EOF flag may have been set. We have to cater to this condition by setting the close flag for filters. We also have to cater to that change in the zlib.inflate filter: If `inflate()` is called with flush mode `Z_FINISH`, but the output buffer is not large enough to inflate all available data, it fails with `Z_BUF_ERROR`. However, `Z_BUF_ERROR` is not fatal; in fact, the zlib manual states: "If deflate returns with Z_OK or Z_BUF_ERROR, this function must be called again with Z_FINISH and more output space (updated avail_out) but no more input data, until it returns with Z_STREAM_END or an error." Hence, we do so. Closes GH-6001.
| * Update version in 7.4 branchDerick Rethans2020-11-071-3/+3
| |
* | Suppress stream errors in mysqlndNikita Popov2020-11-303-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqlnd currently sets error_reporting=0 to suppress errors while writing to streams. Unfortunately these errors are still visible to userland error handlers, which is a source of confusion. See for example https://bugs.php.net/bug.php?id=80412. Instead add a stream flag that suppresses the emission of read/write errors in the first place, and set it in mysqlnd. I think it might be useful to have this option for userland as well in the future, but for now this is just an internal mechanism. Closes GH-6458.
* | 8.0 branch should be prepping for 8.0.1Sara Golemon2020-11-191-3/+3
| |
* | Fire open observer end handlers after a zend_bailoutSammy Kaye Powers2020-11-161-0/+5
| | | | | | | | Closes GH-6377
* | Strip trailing line breaks and periods from Windows error messagesChristoph M. Becker2020-11-121-7/+0
| | | | | | | | | | | | | | | | PHP error messages should not contain line breaks, so we remove these from the Windows specific error messages. We also remove trailing periods for the same reason. Closes GH-6423.
* | Fix invalid memory read on libpathtwosee2020-10-211-1/+1
| | | | | | | | | | | | Introduced in 3e33e1e86d15e262cd9e0224a9604e252f5d9284. Closes GH-6362.
* | Properly handle NULL output start filenameNikita Popov2020-10-161-1/+1
| |
* | Make sure output start filename is not freed earlyNikita Popov2020-10-162-6/+16
| | | | | | | | | | | | | | | | As filenames are no longer interned, we need to keep a reference to the zend_string to make sure it isn't freed. To avoid a nominal source compatibility break, create a new member in the globals.
* | Expose php_during_module_startup() and php_during_module_shutdown()Sammy Kaye Powers2020-10-052-2/+4
| | | | | | | | | | | | This can be handy when trying to determine if it is safe to access request globals amongst other things. Closes GH-6265
* | Prepare for PHP 8.0 RC1Gabriel Caruso2020-09-301-1/+1
| |
* | Fix #78792: zlib.output_compression disabled by Content-Type: image/Christoph M. Becker2020-09-291-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | Disabling output compression for images has served to fix bug #16109, where zlib compressed images apparently have caused issues with Navigator 4. This shouldn't be an issue with somewhat contemporary browsers. Other than that, this is an arbitrary restriction – why don't we disable the compression for some other media types as well (e.g. video/* and audio/*)? All in all, we should leave that decision to userland. Closes GH-6198.
* | Merge branch 'PHP-7.4'Stanislav Malyshev2020-09-281-1/+3
|\ \ | |/ | | | | | | | | | | | | | | * PHP-7.4: Update UPGRADING Update UPGRADING Update NEWS & UPGRADING Do not decode cookie names anymore Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
| * Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2020-09-281-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | * PHP-7.3: Update UPGRADING Update NEWS & UPGRADING Do not decode cookie names anymore Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
| | * Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2020-09-281-2/+6
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.2: Update NEWS & UPGRADING Do not decode cookie names anymore Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
| | | * Do not decode cookie names anymoreStanislav Malyshev2020-09-261-2/+6
| | | |
| | | * bump version to 7.2.34-devRemi Collet2020-08-041-3/+3
| | | |
| | | * bump version to 7.2.32-devRemi Collet2020-05-121-3/+3
| | | |
* | | | Clear error flag instead of toggling itChristoph M. Becker2020-09-231-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The toggling of the `REPORT_ERRORS` looks fishy, and likely was intented as clearing. Closes GH-6190.
* | | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-231-3/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix #76735: Incorrect message in fopen on invalid mode
| * | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-231-3/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.3: Fix #76735: Incorrect message in fopen on invalid mode
| | * | Fix #76735: Incorrect message in fopen on invalid modeChristoph M. Becker2020-09-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to log errors in `stream_opener` callbacks to the wrapper's error log, because otherwise we may pick up an unrelated `errno` or a most generic message. Closes GH-6187.
* | | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-221-6/+7
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix #76943: Inconsistent stream_wrapper_restore() errors
| * | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-221-6/+7
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.3: Fix #76943: Inconsistent stream_wrapper_restore() errors
| | * | Fix #76943: Inconsistent stream_wrapper_restore() errorsChristoph M. Becker2020-09-221-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If restoring of any not registered built-in wrapper is requested, the function is supposed to fail with a warning, so we have to check this condition first. Furthermore, to be able to detect whether a built-in wrapper has been changed, it is not sufficient to check whether *any* userland wrapper has been registered, but rather whether the specific wrapper has been modified. Closes GH-6183.
* | | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-221-1/+17
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix #79423: copy command is limited to size of file it can copy
| * | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-221-1/+17
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.3: Fix #79423: copy command is limited to size of file it can copy
| | * | Fix #79423: copy command is limited to size of file it can copyChristoph M. Becker2020-09-221-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing `NULL` as `lpFileSizeHigh` to `GetFileSize()` gives wrong results for files larger than 0xFFFFFFFF bytes. We fix this by using `GetFileSizeEx()`, and let the mapping fail, if the file size is too large for the architecture. Closes GH-5319.
| | * | 7.3.24 is nextChristoph M. Becker2020-09-151-3/+3
| | | |
* | | | Check linker compatibility directly from HMODULEChristoph M. Becker2020-09-212-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking the linker compatibility with extranous `ImageLoad()` calls is possible, but unnecessary, since the modules are either already loaded or loaded shortly afterwards, so that we can get the required information directly from the module handles. And actually, doing `ImageLoad()` as well as `LoadLibrary()` leaves a tiny room for a race condition, because both functions will lookup the module in the search path, so there is no *guarantee* that both are dealing with the same module. Dropping the `ImageLoad()` calls also has the advantage to no longer face the issue reported in bug #79557. A very minor additional advantage is that we no longer have to link against Imagehlp.dll. Furthermore, there is no need to check for CRT compatibility multiple times, so we can simplify the signature of `php_win32_crt_compatible`, and at the same time clean up main.c a bit. These changes require to change the signature of the exported `php_win32_image_compatible` and `php_win32_crt_compatible` functions, which now expect a `HMODULE` and nothing, respectively, instead of the module name.
* | | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-213-17/+43
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix mmap copying
| * | | Fix mmap copyingChristoph M. Becker2020-09-213-17/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of attempting to map large files into memory at once, we map chunks of at most `PHP_STREAM_MMAP_MAX` bytes, and repeat that until we hit the point where `php_stream_seek()` fails (see bug 54902), and copy the rest of the file by reading and writing small chunks. We also fix the mapping behavior for zero bytes on Windows, which did not error (as with `mmap()`), but would have mapped the remaining file.
* | | | Add system ID entropy APISammy Kaye Powers2020-09-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | The `zend_system_id` is a (true global) system ID that fingerprints a process state. When extensions add engine hooks during MINIT/startup, entropy is added the system ID for each hook. This allows extensions to identify that changes have been made to the engine since the last PHP process restart. Closes GH-5871
* | | | Change int parameter types to bool when the parameter behaves as boolMáté Kocsis2020-09-171-2/+2
| | | | | | | | | | | | | | | | Closes GH-6148
* | | | Fix observer leakNikita Popov2020-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | Make sure to startup observer infrastructure before we register the first observer...
* | | | Rename zend_error_notify APIs to zend_observer_error*Benjamin Eberlei2020-09-141-1/+1
| | | |
* | | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-112-4/+12
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix #80067: Omitting the port in bindto setting errors
| * | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-112-4/+12
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.3: Fix #80067: Omitting the port in bindto setting errors
| | * | Fix #80067: Omitting the port in bindto setting errorsChristoph M. Becker2020-09-112-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent commit[1] which fixed a memory leak introduced a regression regarding the formerly liberal handling of IP addresses to bind to. We fix this by reverting that commit, and fix the memory leak where it actually occurs. In other words, this fix is less intrusive than the former fix. [1] <http://git.php.net/?p=php-src.git;a=commit;h=0b8c83f5936581942715d14883cdebddc18bad30> Closes GH-6104.
* | | | Simplify error type filtertwosee2020-09-101-19/+11
| | | | | | | | | | | | | | | | Closes GH-6049.
* | | | Add "const". Move constant strings to read-only memory.Dmitry Stogov2020-09-072-2/+2
| | | |
* | | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-031-8/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix #80048: Bug #69100 has not been fixed for Windows
| * | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-031-8/+4
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.3: Fix #80048: Bug #69100 has not been fixed for Windows