Commit Graph

47507 Commits

Author SHA1 Message Date
Joe Watkins
f4474e5724
fix flaky posix test 2019-06-05 16:34:50 +02:00
Nikita Popov
ac60007bec Clear errors after SSL_CTX_load_verify_locations()
We report our own errors here. Make sure these don't clog up the
error queue.
2019-06-03 15:14:01 +02:00
Jakub Zelenka
2e02579474 Fix bug #78079 (openssl_encrypt_ccm.phpt fails with OpenSSL 1.1.1c)
It also fixes invalid setting of tag length
2019-06-02 19:10:56 +01:00
Anatol Belski
ee153deb1f Change ZPP only if compiled with ICU >= 64 2019-06-01 02:18:56 +02:00
Nikita Popov
b01d9fdab1 Update tests for ICU 64
(cherry picked from commit 8a8bc5c452)
2019-06-01 02:17:16 +02:00
Craig Duncan
8b53c7232e Add a test for bug #65672 2019-05-30 18:55:42 +01:00
Craig Duncan
dc586bff36 Ensure the internal properties cannot be overwritten 2019-05-30 18:55:36 +01:00
Craig Duncan
5d67271db0 Add tests for DatePeriod properties 2019-05-29 09:47:10 +02:00
Nikita Popov
59dfaa3f99 Fix type inference of SEND_UNPACK with empty array
An empty array will not be turned into an array of references.
This violated the invariant than an array has values iff it has
keys.
2019-05-28 16:40:56 +02:00
Stanislav Malyshev
fbb6a27212 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77967 - Bypassing open_basedir restrictions via file uris
2019-05-27 21:36:00 -07:00
Stanislav Malyshev
c34895e837 Fix bug #77967 - Bypassing open_basedir restrictions via file uris 2019-05-27 18:48:48 -07:00
Stanislav Malyshev
dc1d99e772 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77988 - heap-buffer-overflow on php_jpg_get16
2019-05-27 17:28:20 -07:00
Stanislav Malyshev
73ff4193be Fix bug #77988 - heap-buffer-overflow on php_jpg_get16 2019-05-27 17:28:09 -07:00
Stanislav Malyshev
9bca9ef6cf Fix function name 2019-05-27 17:20:56 -07:00
Stanislav Malyshev
e77c8e45ba Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
  Fix #77973: Uninitialized read in gdImageCreateFromXbm
2019-05-27 16:49:19 -07:00
Stanislav Malyshev
7cf7148a8f Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow 2019-05-27 16:32:42 -07:00
Christoph M. Becker
ed6dee9a19 Fix #77973: Uninitialized read in gdImageCreateFromXbm
We have to ensure that `sscanf()` does indeed read a hex value here,
and bail out otherwise.
2019-05-27 16:11:32 -07:00
Michael Maroszek
a0c9d0849a Fixed bug #76345 2019-05-27 17:42:20 +02:00
Jakub Zelenka
8baf3ffde6 Add fpmi to the opcache supported sapis 2019-05-26 18:47:22 +01:00
Nikita Popov
9a74b23297 Fixed bug #78038 socket_select with references 2019-05-23 11:12:15 +02:00
Dmitry Stogov
fa6a4483e6 Fixed race condition in opcache restart 2019-05-23 00:20:35 +03:00
Sjon Hortensius
96404eb8e2 Fix #77956 - When mysqli.allow_local_infile = Off, return a client error 2019-05-22 12:44:55 +02:00
Christoph M. Becker
62fe6ba20c Fix test case for cURL 7.65.0
Reported and patch provided by @Jan-E.
2019-05-22 12:01:23 +02:00
Nikita Popov
3a0de243c3 Use a different URL in bug44811.phpt 2019-05-22 11:41:51 +02:00
Rasmus Lerdorf
7b42cdf95e Fix precedence issue causing sub-second timeouts to be 0 in
curl_multi_select
2019-05-21 14:44:11 -07:00
Christoph M. Becker
e6a191de1b Prevent test case failure
If opcache.log_verbosity_level is greater than 1, opcache will raise
warnings, which will be written to stderr in the default case.  These
warnings are actually to be expected, but would break the test, so we
make sure that the log_verbosity_level is 1 when running this test.
2019-05-21 11:17:51 +02:00
Vincent JARDIN
5f8c22d415 Support content_type stream context option in soap
Allows overriding the HTTP header using the HTTP context:

    $client = new SoapClient('http://url.wsdl&v=latest', [
      'stream_context' => stream_context_create([
        'http' => [
          'content_type' => 'foobarX',
        ],
      ]),
    ]);

This is a backport of c55af3c65a
to the PHP 7.2 branch.
2019-05-21 10:04:15 +02:00
Holly Li (WIPRO LIMITED)
202e6936d6 use {TMP} placeholder in phpt tests 2019-05-21 09:02:37 +02:00
Dmitry Stogov
a8a019d68a Prevent race condition in opcache_reset() 2019-05-21 00:07:17 +03:00
Christoph M. Becker
64ec9f4dbe Fix test wrt. opcache.error_log
Since the test expects log messages to be written to stderr, we have to
make sure that opcache.error_log is set correctly when running the
test.
2019-05-20 11:09:44 +02:00
Christoph M. Becker
e246dea9fe Fix #78025: segfault when accessing properties of DOMDocumentType
Instead of following the NULL pointer, we return an empty string.
2019-05-17 13:31:18 +02:00
Dmitry Stogov
5c4d125d4c Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset 2019-05-14 14:53:52 +03:00
Peter Kokot
f95b27c6f6 Convert CRLF to LF
These files are tracked with CRLF line endings in Git and can be
converted to LF. Neither are parts of tests or code itself.
2019-05-13 03:51:00 +02:00
Peter Kokot
b15bfb9129 Convert CRLF to LF in *.wsdl files
These EOL types are part of different environments and not part of the
tests themselves.
2019-05-11 17:12:28 +02:00
Nikita Popov
35c80583f0 Fixed bug #75186 2019-05-09 12:33:53 +02:00
Christoph M. Becker
e359812ce3 Fix log_verbosity_bug.phpt
This test may fail on Windows due to the file cache fallback.  We
ensure that this will not happen.
2019-05-09 12:15:00 +02:00
Jakub Zelenka
9977de0028 Fix OpenSSL online test for ca context
The php.net is redirected to https so use nginx.org
2019-05-05 21:04:28 +01:00
Stanislav Malyshev
cb5af4e8a0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77950 - Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG
2019-04-30 00:05:32 -07:00
Stanislav Malyshev
f80ad18afa Fix bug #77950 - Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG
I do not completely understand what is going on there, but I am pretty
sure dir_entry <= offset_base if not a normal situation, so we better not
to rely on such dir_entry.
2019-04-30 00:05:23 -07:00
Christoph M. Becker
18a9ae412f Fix #77943: imageantialias($image, false); does not work
Firstly, we must not call `gdImageSetAntiAliased()` (which sets the
color to anti-alias), but rather modify the `gdImage.AA` flag.
Furthermore, we have to actually use the supplied boolean value.

We also make sure that we don't attempt to enable anti-aliasing for
palette images.
2019-04-29 17:23:16 +02:00
Christoph M. Becker
3891e0d13a Add tests for bug77943 2019-04-29 16:29:08 +02:00
Nikita Popov
5da0579259 Fixed bug #77945
Make sure that we proper distinguish between empty string key and
no key during SDL serialization.
2019-04-29 13:52:18 +02:00
Christoph M. Becker
9bf11045db Fix tests
These tests are obviously meant to test successful and failing uri:
DSNs, but did not pass proper file:// URIs, so actually ended up
testing for invalid data source URIs twice.  We fix this, and adjust
the expectations accordingly.

We also unfork the -win32 variant, since both test cases are almost
identical, and the expected error message may be either one.
2019-04-29 09:04:33 +02:00
Christoph M. Becker
fc9cdb723b Make MySQLPDOTest::extractVersion() more liberal
MySQL/MariaDB version strings may have suffixes which may contain dots;
for instance, Debian stretch has 5.5.5-10.1.37-MariaDB-0+deb9u1 or
such.  Therefore, we make the version extraction more liberal, and only
require that there are at least three parts separated by dot, and
ignore additional parts.

We also fix an erroneous test expectation, which would be triggered on
CI now, right away.  This patch has been provided by petk@.
2019-04-28 23:48:27 +02:00
Craig Duncan
91c6fb881e Fix #77024: SplFileObject::__toString() may return array
- Correct the behaviour of casting spl files to strings
- Add a test for Bug 77024
2019-04-28 00:44:48 +02:00
Christoph M. Becker
16609880f8 Fix #77944: Wrong meta pdo_type for bigint on LLP64
When actually fetching the data, bigint (unsigned) column values are
returned as integers on LLP64 architectures, so their pdo_type has to
be PDO::PARAM_INT accordingly.
2019-04-27 18:46:27 +02:00
Christoph M. Becker
7ddfe73e69 Fix #77940: test using outdated mon_thousands_sep for Swedish
Of course, we should expect a comma, not a period.
2019-04-25 23:28:41 +02:00
Christoph M. Becker
bfbfb9dabd Fix #77940: test using outdated mon_thousands_sep for Swedish
This time so that it works for all Windows 10 versions (hopefully).
2019-04-25 19:39:42 +02:00
Christoph M. Becker
37ca6a7a2a Fix #77940: test using outdated mon_thousands_sep for Swedish 2019-04-25 08:58:13 +02:00
Christoph M. Becker
fe202d99c8 Fix #77938: socket_get_option error
Since tcp_socket/ssl streams are not representable, we suppress the
redirect to fix the test case.
2019-04-25 00:03:45 +02:00
Nikita Popov
4831e150c5 Fixed bug #77843 2019-04-23 12:43:07 +02:00
Christoph M. Becker
d20053a556 Fix #77911: Wrong warning for session.sid_bits_per_character 2019-04-17 17:23:23 +02:00
Ignace Nyamagana Butera
7b1a4e2400 Fixed bug #77909: DatePeriod::__construct() with invalid recurrence count value
Improve error message on invalid reccurence count

Adding test when reccurence is -1
2019-04-17 09:39:03 +01:00
Christoph M. Becker
6fe75f9e45 Fix tests for non English environments 2019-04-17 09:56:55 +02:00
Nikita Popov
619c4e9f2e Fixed bug #77895 2019-04-15 15:26:58 +02:00
Nikita Popov
917952453c Fix uninitialized cert_captured
This is a legimitimate bug and also shows up under valgrind.
2019-04-15 10:53:33 +02:00
Nikita Popov
e9c0367fdc Fixed bug #77882 2019-04-15 10:22:40 +02:00
Christoph M. Becker
d07a6fdedf Fix tests wrt. internationalization 2019-04-12 13:07:39 +02:00
Nikita Popov
3b53d28e60 Fix key leaks in mb_convert_encoding() 2019-04-12 10:36:58 +02:00
Anatol Belski
5477d68300 Fix potential OPcache file cache related issues
To solve issues detected during testing, we backport the following
commits to PHP 7.2:

129c5c1181
9ac133a0b3
ce72bc6b65
2019-04-11 18:28:49 +02:00
Anatol Belski
f31d7ca85e Fix phar:// include handling with file cache 2019-04-10 14:55:15 +02:00
Nikita Popov
8f13599a64 Fix 29nb_async_connect.phpt
Intermediate states are unreliable across versions (I think), make
sure we go through the whole connect procedure.
2019-04-10 13:06:02 +02:00
Nikita Popov
c7a86a38a3 Fix pgsql use after free trying to reuse closed connection
When a connection is closed, we also need to remove the hash entry
from the regular_list, as it now points to freed memory. To do this
store a reverse mapping from the connection to the hash string.

It would be nicer to introduce a wrapping structure for the pgsql
link resource that could store the hash (and notices), but that would
require large changes to the extension, so I'm going for a more
minimal fix here.
2019-04-10 12:18:57 +02:00
Nikita Popov
b55715d61a Fix use after free on pg_close() of default connection 2019-04-10 10:38:24 +02:00
twosee
bdac9ef10d Preserve keys in emulate_read_fd_set()
Keys are already preserved in the non-emulated case.
2019-04-08 12:58:46 +02:00
Nikita Popov
d7b5954f28 Fixed bug #77853 2019-04-08 11:40:50 +02:00
Nikita Popov
eea61cda7d Fixed bug #77844
We should probably return an integer result from the operation in
typed mode, right now the result is always a string.
2019-04-08 11:11:58 +02:00
Stanislav Malyshev
d1d692abe7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Always use ZEND_SECURE_ZERO() when cleaning up data
  bump versions after release
2019-04-06 19:05:37 -07:00
Stanislav Malyshev
588db7cecf Always use ZEND_SECURE_ZERO() when cleaning up data
Optimizing compilers have an annoying tendency to throw out
memsets over data that they think aren't used anymore. Apply secure
zero-out in cases where this has potential to happen.
2019-04-06 18:15:42 -07:00
Joe Watkins
a2b8a62abf
Follow up #77849 PDOStatement objects in undefined state after clone 2019-04-06 01:26:47 +02:00
Cameron Porter
9ec1525eb5
Fix bug #77849 Disable cloning of PDO handle/connection objects to avoid segfault 2019-04-06 00:54:59 +02:00
Dmitry Stogov
56a5d0bd91 Fixed CFG construction for SWITCH opcodes 2019-04-03 03:09:03 +03:00
Remi Collet
f7755163b7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix paste issue
2019-04-02 11:05:39 +02:00
Remi Collet
dc1cd3daf2 fix paste issue 2019-04-02 11:05:09 +02:00
Christoph M. Becker
f6efe70505 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Pointer arithmetic on void pointers is illegal
2019-04-02 10:40:56 +02:00
Christoph M. Becker
01a4de5c58 Pointer arithmetic on void pointers is illegal
We quick-fix this by casting to char*; it might be more appropriate to
use char pointers in the first place.
2019-04-02 10:39:44 +02:00
Stanislav Malyshev
c83af86f8b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF
2019-04-02 00:12:54 -07:00
Stanislav Malyshev
887a7b5714 Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF 2019-04-02 00:12:26 -07:00
Stanislav Malyshev
f3ab302270 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s
2019-03-31 23:09:18 -07:00
Stanislav Malyshev
f3aefc6d07 Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s 2019-03-31 23:09:06 -07:00
Christoph M. Becker
88460c017a Fix #77827: preg_match does not ignore \r in regex flags 2019-03-31 13:31:54 +02:00
Matteo Beccati
0dbb581cf4 Fixed SKIPIF when --disable-mbregex is used 2019-03-30 18:28:33 +01:00
Christoph M. Becker
0aa1a2c833 Fix test expectation
The `W32_SM_SENDMAIL_FROM_MALFORMED` error message will only be shown
if the `$additional_headers` parameter is passed to `mail`, which is
not the case for this test.  Instead we have to expect `BAD_MSG_RPATH`.
2019-03-29 09:55:04 +01:00
Stanislav Malyshev
402adc1df1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Validate subject encoding in mb_split and mb_ereg_match
  Validate pattern against mbregex encoding
  SQLite3: add DEFENSIVE config for SQLite >= 3.26.0 as a mitigation strategy against potential security flaws
2019-03-28 00:35:22 -07:00
Nikita Popov
0ecac37c40 Validate subject encoding in mb_split and mb_ereg_match
We were already validating the subject encoding in most functions,
but not these two.
2019-03-27 23:20:27 -07:00
Nikita Popov
40fe50daf6 Validate pattern against mbregex encoding
Oniguruma does not consistently perform this validation itself (at least
on older versions), so make sure we check pattern encoding validity on the
PHP side.
2019-03-27 23:19:46 -07:00
Vlad Temian
ec2ecb7e12 Fix bug #77680: Correctly implement recursive mkdir on FTP stream
If the root directory was missing, an extra CWD without arguments was
made. Also, the MKD contained an empty string.

Now the CWD will use / and MKDs will be issued starting from the root
directory.
2019-03-25 17:43:46 +01:00
Nikita Popov
85095dfd09 Fixed bug #72175
Make sure we don't close the connection we're trying to reuse...
2019-03-25 16:41:21 +01:00
Remi Collet
2e9dccef78 ensure pcre.jit=1 for these tests 2019-03-22 15:00:31 +01:00
Nikita Popov
da35fa2cb8 Fixed bug #77772 2019-03-22 12:39:27 +01:00
Remi Collet
a467a89f16 Fix tests after fix for #76717 2019-03-20 14:07:26 +01:00
Vlad Temian
fe2885d80a Fixed bug #77765
Set mode 40755 for directories, via FTP stream stat.

Because we already manage to CWD into the current directory,
we should set 40755 as mode, instead of 40644.
2019-03-19 10:02:38 +01:00
Christoph M. Becker
41bc51ce2d Fix #77578: Crash when php unload
Since we're putting `ITypeLib *`s into the hash, we're getting
`ITypeLib *`s back, not `ITypeLib **`s.
2019-03-18 19:21:38 +01:00
Xinchen Hui
e072537e7f Simplfy test case
(I was working on the same bug while nikic committed the similar fix
2019-03-18 19:28:23 +08:00
Nikita Popov
b3a669bec1 Make test independent of icu version
We don't really care about the actual output here, just that it
doesn't fail.
2019-03-18 12:14:58 +01:00
Nikita Popov
433758ceb3 Allow DateTimeImmutable in datefmt_format_object()
As pointed out in a comment on bug #65683.
2019-03-18 11:39:16 +01:00
Nikita Popov
4f03401628 Partial fix for bug #77751
This avoids the segfault, but it will not make writing to the
SplFileObject during output shutdown work.
2019-03-18 11:06:23 +01:00
Nikita Popov
54bf8c820f Fixed bug #77743 2019-03-18 10:49:53 +01:00
Nikita Popov
a573c0e9ed Fix unused variable warning 2019-03-18 10:11:00 +01:00
Derick Rethans
ab07bc1fff Fixed 7.2 compat issue 2019-03-17 14:53:56 -04:00