Nikita Popov
2b3b7f5cd9
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
2020-03-25 10:51:23 +01:00
Christian Schneider
c0840fec9c
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
...
Closes GH-5292.
2020-03-25 10:50:35 +01:00
Christoph M. Becker
9e6d80dc8f
Fix potential test conflict
...
Cf. <https://ci.appveyor.com/project/php/php-src/builds/31564684/job/k9u3xv860fao3n2e#L5578 >
2020-03-20 08:56:40 +01:00
Nikita Popov
ba6834fa57
Make bug52820.phpt more robust
...
Use a more robust error condition...
2020-03-18 11:46:27 +01:00
Stanislav Malyshev
335547a04d
Fix bug #79329 - get_headers should not accept \0
2020-03-16 22:40:48 -07:00
Stanislav Malyshev
69fdc14152
Fix bug #79329 - get_headers should not accept \0
2020-03-16 22:40:00 -07:00
Christoph M. Becker
8657f03084
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78210 : Invalid pointer address
2020-03-11 11:31:26 +01: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
Peter Seiderer
f73528f0e0
Check for sys/auxv.h before using it.
...
Fixes aarch64 compile with uclibc-ng (does not provide
sys/auxv.h header file).
Closes GH-5248.
Signed-off-by: Peter Seiderer <ps.report@gmx.net >
2020-03-10 16:53:57 +01:00
Christoph M. Becker
fea2994ff8
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Enclose INI values containing {TMP} in quotes
2020-03-09 22:51:11 +01:00
Christoph M. Becker
d5e206620b
Enclose INI values containing {TMP} in quotes
...
At least on Windows, the temporary directory may contain tilde signs,
which would result in an INI parse error.
2020-03-09 22:49:08 +01:00
Christoph M. Becker
04c9c4ae7d
Fix intermittent test failures of windows_mb_path tests
...
Some of these tests create, use and later remove the same folder, so if
these are run in parallel, they may fail due to race conditions[1]. As
quick fix we add appropriate CONFLICTS clauses to prevent parallel
execution of the respective test groups.
[1] <https://ci.appveyor.com/project/php/php-src/builds/31213037/job/48rp13i0frf5t9hl#L5480 >
2020-03-04 12:15:10 +01:00
Nikita Popov
c5128fb7fc
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Don't treat any WS as start of header
2020-02-24 10:20:43 +01:00
Nikita Popov
56cdbe63c2
Don't treat any WS as start of header
...
Check that the header occurs after \n, not other whitespace
characters.
2020-02-24 10:20:33 +01:00
Nikita Popov
8d451fd24e
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Reduce code duplication in HTTP header checks
2020-02-24 10:03:30 +01:00
Nikita Popov
3d9c02364d
Reduce code duplication in HTTP header checks
2020-02-24 10:03:05 +01:00
Nikita Popov
e855b286c8
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixes #79265 : Improper injection of Host header when using fopen for http requests
2020-02-24 09:51:36 +01:00
Miguel Xavier Penha Neto
d0d60503b5
Fixes #79265 : Improper injection of Host header when using fopen for http requests
...
Check all occurrences of the string "host:" (and other headers),
not just the first one.
2020-02-24 09:50:32 +01:00
Christoph M. Becker
1c6b084262
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Add test for bug #78569
2020-02-21 10:32:45 +01:00
Christoph M. Becker
ad000a63e8
Add test for bug #78569
2020-02-21 10:31:26 +01:00
Christoph M. Becker
e1de11d467
Create a new console for each test worker on Windows
...
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.
2020-02-17 18:52:45 +01:00
Christoph M. Becker
93b183ed55
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #79254 : getenv() w/o arguments not showing changes
2020-02-11 11:57:57 +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
Nikita Popov
58b17906f5
Apply tidy formatting
...
Mostly reindent PHP scripts to spaces.
2020-02-03 13:41:31 +01:00
Christoph M. Becker
addc3c92f2
Fix #79174 : cookie values with spaces fail to round-trip
...
The fix for bug #78929 disabled the conversion of spaces in cookie
values to plus signs, but failed to adapt `php_setcookie()`
accordingly, so that it uses raw URL encoding as well.
2020-01-28 15:37:01 +01:00
Máté Kocsis
ea1b878877
Fix #78969 Make PASSWORD_DEFAULT match PASSWORD_BCRYPT instead of being null
...
It was an unintentional BC break.
2020-01-27 13:57:00 +01:00
Nikita Popov
1cccbb8ff1
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix bug #78323 : Code 0 is returned on invalid options
2020-01-27 13:32:38 +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
Christoph M. Becker
372b678e56
Yet another check for php_strip_tags_ex()
2020-01-24 13:02:02 +01:00
Christoph M. Becker
1b7343b93c
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Yet another check for php_strip_tags_ex()
2020-01-24 12:51:02 +01:00
Christoph M. Becker
6d57476fd7
Yet another check for php_strip_tags_ex()
2020-01-24 12:50:24 +01:00
Nikita Popov
6489e29831
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed bug #78902
Add unit test for bug #78902
2020-01-23 14:58:10 +01:00
liudaixiao
67421a780d
Fixed bug #78902
2020-01-23 14:57:16 +01:00
Léopold Jacquot
f720fb1e21
Add unit test for bug #78902
2020-01-23 14:53:28 +01:00
Stanislav Malyshev
984d508825
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
More checks for php_strip_tags_ex
2020-01-22 23:06:28 -08:00
Stanislav Malyshev
dd3c664f8f
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
More checks for php_strip_tags_ex
2020-01-22 22:41:56 -08:00
Stanislav Malyshev
2dc170e25d
More checks for php_strip_tags_ex
2020-01-22 22:37:30 -08:00
Stanislav Malyshev
a29c793381
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Update NEWS
Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`)
Fix #79099 : OOB read in php_strip_tags_ex
Fix #79091 : heap use-after-free in session_create_id()
2020-01-20 22:47:01 -08:00
Stanislav Malyshev
25ec7eb346
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Update NEWS
Fix bug #79037 (global buffer-overflow in `mbfl_filt_conv_big5_wchar`)
Fix #79099 : OOB read in php_strip_tags_ex
Fix #79091 : heap use-after-free in session_create_id()
2020-01-20 22:46:29 -08:00
Stanislav Malyshev
0f79b1bf30
Fix #79099 : OOB read in php_strip_tags_ex
2020-01-20 21:43:42 -08:00
Nikita Popov
c247898949
Fix test
...
Hopefully (32-bit)
2020-01-13 10:09:58 +01:00
Nikita Popov
e748a5a0e6
Remove unnecessary whitespace sensitivtiy from some tests
2020-01-10 17:36:46 +01:00
Christoph M. Becker
bf629baa9c
Silence potential taskkill error messages
...
That test is still intermittently failing, because failure to kill the
child process is reported. Therefore we silence these error messages.
2020-01-09 19:01:37 +01:00
Christoph M. Becker
cfa9e5e05e
Fix useless tests
...
These tests are certainly not supposed to fail due to a typo in the
class names, but expect this failure. We fix the typos and the
expectations.
2020-01-09 17:42:22 +01:00
Christoph M. Becker
896f7533ee
Increase sleep() time in test case
...
Apparently, the former increase to `sleep(2)` helped somewhat, but
still the test fails occassionally.
2020-01-07 14:26:31 +01:00
Nikita Popov
846b647953
Throw Error when referencing uninit typed prop in __sleep
...
Previously this generated a notice, but would likely generate an
Error when unserializing.
Now we treat it with the same distinction as direct property
accesses, i.e. referencing an unset/undefined normal property
stays a notice, while a typed property becomes an Error exception.
This fixed bug #79002 .
Closes GH-5050.
2020-01-06 18:47:27 +01:00
Christoph M. Becker
09ebeba1af
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #54298 : Using empty additional_headers adding extraneous CRLF
2020-01-06 14:48:46 +01:00
Christoph M. Becker
ae2150692a
Fix #54298 : Using empty additional_headers adding extraneous CRLF
...
If the header string is empty, we pass `NULL` to `php_mail()` to avoid
further checks on the string length.
2020-01-06 14:47:23 +01:00
Nikita Popov
7f02b5fc47
Slightly increase tolerance in time_sleep_until() test
...
With the 1ms tolerance this still occasionally fails on macos.
I love macos. It always works and causes no problems at all.
2020-01-03 16:49:15 +01:00
Christoph M. Becker
fc6e83e01a
Try to fix intermittently failing test case
...
This test fails intermittently due to taskill reporting failure to kill
the process (because it already has been terminated). We increase the
sleep time, to hopefully prevent that from happening again.
2020-01-03 16:44:53 +01:00