Commit Graph

5193 Commits

Author SHA1 Message Date
Christoph M. Becker
33226c3a17 Next is 7.3.18 2020-03-31 10:22:55 +02:00
Christoph M. Becker
53797c206a Fix #78210: Invalid pointer address
This is actually about three distinct issues:

* If an empty string is passed as $address to `stream_socket_sendto()`,
  the `sa` is not initialized, so we must not pass it as `addr` to
  `php_stream_xport_sendto()`.

* On POSIX, `recvfrom()` truncates messages which are too long to fit
  into the specified buffer (unless `MSG_PEEK` is given), discards the
  excessive bytes, and returns the buffer length.  On Windows, the same
  happens, but `recvfrom()` returns `SOCKET_ERROR` with the error code
  `WSAEMSGSIZE`.  We have to catch this for best POSIX compatibility.

* In `php_network_parse_network_address_with_port()`, we have to zero
  `in6` (not only its alias `sa`) to properly support IPv6.

Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
2020-03-11 11:30:15 +01:00
Christoph M. Becker
9dda3b9eb2 Next is 7.3.17 2020-03-03 10:19:31 +01:00
Christoph M. Becker
7b464ce6f3 Fix #79254: getenv() w/o arguments not showing changes
To be able to see changes done only with `SetEnvironmentVariable()`, we
have to use `GetEnvironmentStrings()` instead of `environ`, because the
latter sees only changes done with `putenv()`.

For best backward compatibility we're using `GetEnvironmentStringsA()`;
switching to the wide string version likely makes sense for master,
though.
2020-02-11 11:47:29 +01:00
Christoph M. Becker
e3632fdc0d Next is 7.3.16 2020-02-04 11:38:29 +01:00
Ivan Mikheykin
fd08f062ae Fix bug #78323: Code 0 is returned on invalid options
Set CLI exit code to 1 when invalid parameters are passed,
and print error to stderr.
2020-01-27 13:32:19 +01:00
liudaixiao
67421a780d Fixed bug #78902 2020-01-23 14:57:16 +01:00
Nikita Popov
018251a7c4 Fixed bug #71876
This is a backport of fcdc0a6db0
to the PHP-7.3 branch. We need to make sure that OnUpdateString
is also called for a NULL value, otherwise the reset of the encoding
at the end of the request will not work.

I believe I already tried to land this before once, but it didn't
actually end up on the PHP-7.3 branch due to a push conflict that
I only noticed just now.
2020-01-17 09:47:31 +01:00
Christoph M. Becker
38c0a53b60 Bump version 2020-01-07 11:03:19 +01:00
Christoph M. Becker
65bbc67063 Next is 7.3.14 2019-12-03 12:04:17 +01:00
Christoph M. Becker
4c9ba3e042 7.3.13 is next 2019-11-05 18:20:56 +01:00
Christoph M. Becker
bbd481c11d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78656: Parse errors classified as highest log-level
2019-10-09 17:28:50 +02:00
Erik Lundin
3164186d53 Fix #78656: Parse errors classified as highest log-level 2019-10-09 17:27:32 +02:00
Nikita Popov
2fdd142f99 Check for exception after applying stream filters
This makes the stream opening actually fail, and avoids assertion
failures when we tokenize with EG(exception) set.

Also avoid throwing an additional warning after an exception has
already been thrown.
2019-10-08 12:32:57 +02:00
Christoph M. Becker
26f45cb4bb 7.3.12 is next 2019-10-08 12:04:25 +02:00
Remi Collet
05d6878b3b next is 7.2.25 2019-10-08 11:36:10 +02:00
Joe Watkins
5b1bb23edf
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #76859 stream_get_line skips data if used with data-generating filter
2019-10-03 06:51:10 +02:00
Konstantin Kopachev
05560b67bc
Fix #76859 stream_get_line skips data if used with data-generating filter
stream_get-line repeatedly calls php_stream_fill_read_buffer until
enough data is accumulated in buffer. However, when stream contains
filters attached to it, then each call to fill buffer essentially
resets buffer read/write pointers and new data is written over old.
This causes stream_get_line to skip parts of data from stream
This patch fixes such behavior, so fill buffer call will append.
2019-10-03 06:50:43 +02:00
Sara Golemon
a270eb1911 Bump for 7.2.24 2019-09-10 13:04:01 -04:00
Christoph M. Becker
cf31210f29 PHP 7.3.10RC1 has been tagged 2019-09-10 15:11:54 +02:00
Christoph M. Becker
73ede6911d Fix version
7.3.10 is next, not 7.3.11.
2019-09-09 15:44:06 +02:00
Stanislav Malyshev
60cfa5781a fix version 2019-09-05 09:54:43 -07:00
Nikita Popov
e9cfd94b8e Merge branch 'PHP-7.2' into PHP-7.3 2019-08-30 16:07:43 +02:00
Sergei Turchanov
8f564e5308 Fixed bug #78469
fcgi_accept_request function is supposed to call a FastCGI implementation's
on_accept hook when entering an "accepting" stage (that is right before
calling "accept"). This hook implementation (fpm_request_accepting) updates
a worker state to an "accepting" state which is effectively an "Idle" state,
and updates counters on the scoreboard of the corresponding pool (idle++,
active--).

But this is not done when listening for client connections on a named pipe on
Windows platform. In that case a combination of
ConnectNamedPipe/WaitForSingleObject is used (to be able to catch in_shutdown
as far as I understand), but it is nonetheless functionally equivalent to
"accept" call. Also by not calling on_hook neither a worker's state is updated
to "accepting" state nor scoreboard counters are updated.
2019-08-30 16:06:50 +02:00
Stanislav Malyshev
d3f2cfe20a Update Oniguruma to 6.9.1 2019-08-25 00:02:32 -07:00
Sara Golemon
4b64d47c99
Bump for 7.2.23 2019-08-13 19:32:12 -04:00
Christoph M. Becker
5536105b67 Next will be 7.3.10 2019-08-13 23:57:48 +02:00
Christoph M. Becker
fe7997912d Bump version numbers
This should have been done four weeks ago already.
2019-08-13 23:23:43 +02:00
Nikita Popov
44fe025c28 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-29 17:34:16 +02:00
Albert Casademont
dc7aa22b18 Fix bug #78326
Similar to what fread() does, truncate the stream_get_contents()
result if the original buffer was way too large.
2019-07-29 17:33:57 +02:00
Nikita Popov
bbed5564eb Merge branch 'PHP-7.2' into PHP-7.3 2019-07-29 16:57:57 +02:00
Nikita Popov
38f1288b64 Fix Zend signals unblocking
There are a few parts here:
 * opcache should not be blocking signals while invoking compile_file,
   otherwise signals may remain blocked on a compile error. While at
   it, also protect SHM memory during compile_file.
 * We should deactivate Zend signals at the end of the request, to make
   sure that we gracefully recover from a missing unblock and signals
   don't remain blocked forever.
 * We don't use a critical section in deactivation, because it should
   not be necessary. Additionally we want to clean up the signal queue,
   if it is non-empty.
 * Enable SIGG(check) in debug builds so we notice issues in the future.
2019-07-29 15:17:32 +02:00
Nikita Popov
79efd55fc3 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-17 15:59:14 +02:00
Nikita Popov
b864abfe23 Fixed bug #69100 2019-07-17 15:58:29 +02:00
Remi Collet
c9037421ac next is 7.2.22 2019-07-16 10:38:20 +02:00
Erik Lundin
9f0515c40c Add syslog.filter=raw
This passes through syslog message unchanged, without splitting
messages at newlines.
2019-06-17 13:13:25 +02:00
Christoph M. Becker
bcf20963c1 Next is 7.3.8 2019-06-11 13:31:30 +02:00
Remi Collet
feb92adc5c next is 7.2.21 2019-06-11 12:20:26 +02:00
Sara Golemon
4fa32d67bf
Bump for 7.2.20 2019-05-14 20:22:00 -04:00
Christoph M. Becker
2d93cce03a Prepare 7.3.7-dev 2019-05-14 11:44:58 +02:00
Remi Collet
6c44a71e4a next is 7.2.19 2019-04-16 13:11:23 +02:00
Christoph M. Becker
5ae49c43dc Prepare main branch for PHP 7.3.6 2019-04-16 11:56:03 +02:00
Nikita Popov
e05c6a25f9 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-15 15:00:49 +02:00
Nikita Popov
9b1950b005 Zero sockaddr struct
in6 has a bunch of extra fields that we're leaving uninitialized. I
don't see them locally, but there's valgrind warnings on gcov.
2019-04-15 14:59:05 +02:00
Sara Golemon
963428a75d
Bump versions for 7.2.18 2019-03-19 14:31:08 -04:00
Christoph M. Becker
a2de42041c Prepare main branch for PHP 7.3.5 2019-03-19 16:20:55 +01:00
Stanislav Malyshev
609195e991 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77630 - safer rename() procedure
2019-03-04 09:18:22 -08:00
Stanislav Malyshev
2cc1ab81c2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77630 - safer rename() procedure
2019-03-04 09:17:14 -08:00
Stanislav Malyshev
e3133e4db7 Fix bug #77630 - safer rename() procedure
In order to rename safer, we do the following:
- set umask to 077 (unfortunately, not TS, so excluding ZTS)
- chown() first, to set proper group before allowing group access
- chmod() after, even if chown() fails
2019-03-04 09:15:11 -08:00
Xinchen Hui
3c3d59aa39 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77664 (Segmentation fault when using undefined constant in custom wrapper)
2019-02-25 14:42:01 +08:00