Commit Graph

123929 Commits

Author SHA1 Message Date
P.I.E. Security Team
9b794f8e5e
Expose libsodium's Ristretto255 API (#6922) 2021-05-07 17:43:00 -05:00
Ben Ramsey
01ce8d3a78
Add entries for new behavior of PDO_ODBC server info/version attributes 2021-05-07 16:41:26 -05:00
Nikita Popov
ef938d5ee4 Revert "Disable destructors on fuzzer bailout"
This reverts commit ed33262dbb.

With adjusted bailout handling in fibers, this should no longer
be necessary.
2021-05-07 23:06:20 +02:00
Aaron Piotrowski
af2905968c
Add sanitizer fiber switching support 2021-05-07 15:52:12 -05:00
Aaron Piotrowski
ccc069d0bb
Catch and repeat zend_bailout in fibers
This removes switching to main for fatal errors in fibers in favor of catching any zend_bailout in a fiber and calling zend_bailout again after switching to the previous fiber or {main}.
2021-05-07 15:52:11 -05:00
Nikita Popov
ca8247654c Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix zip build
2021-05-07 22:42:50 +02:00
Nikita Popov
1c2e7b4ea0 Fix zip build 2021-05-07 22:42:31 +02:00
Christoph M. Becker
cc86f70de9
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80863: ZipArchive::extractTo() ignores references
2021-05-07 19:22:51 +02:00
Christoph M. Becker
ab3052ab26
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80863: ZipArchive::extractTo() ignores references
2021-05-07 19:21:58 +02:00
Christoph M. Becker
57918b1a1b
Fix #80863: ZipArchive::extractTo() ignores references
We need to cater to references, when traversing the files to extract.
While we're at it, we move the `zval_file` declaration into a narrower
scope.

Closes GH-6959.
2021-05-07 19:15:29 +02:00
Nikita Popov
32b107e6a6 Use smart_str_extend() instead of smart_str_alloc()
These usages were re-implementing the exact functionality of
smart_str_extend().
2021-05-07 16:42:17 +02:00
Nikita Popov
072c50fc77 Merge branch 'PHP-8.0'
* PHP-8.0:
  Update msan job to Ubuntu 20.04
  Skip some tests under msan
2021-05-07 16:28:57 +02:00
Nikita Popov
f547bddcc0 Update msan job to Ubuntu 20.04
Also don't explicitly specify symbolizer path. This doesn't appear
to be necessary anymore, and avoids a dependence on the specific
LLVM version used.
2021-05-07 16:28:01 +02:00
Nikita Popov
af948ae24c Skip some tests under msan
These test functions which don't have msan interceptors. This
results in false positives running msan on ubuntu 20.04.
2021-05-07 16:26:49 +02:00
Máté Kocsis
4ece535f19
Merge branch 'PHP-8.0'
* Fix return type of php_user_filter::onCreate()
* Fix return type of mysqli::init()
* Fix return type of UConverter::fromUCallback() and UConverter::toUCallback()
2021-05-07 15:23:28 +02:00
Máté Kocsis
54e2ef0b81
Fix return type of UConverter::fromUCallback() and UConverter::toUCallback()
Closes GH-6950
2021-05-07 15:21:58 +02:00
Máté Kocsis
e8361eb0e3
Fix return type of mysqli::init() 2021-05-07 15:21:41 +02:00
Máté Kocsis
a3c38c2596
Fix return type of php_user_filter::onCreate() 2021-05-07 15:21:11 +02:00
Nikita Popov
4baf340c39 Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove getservbyname() variation tests
  Use SOL_TCP instead of getprotobyname() in tests
2021-05-07 14:56:13 +02:00
Nikita Popov
12118d592a Remove getservbyname() variation tests
These are zpp variations, which we no longer test.
2021-05-07 14:55:27 +02:00
Nikita Popov
0413cf3c20 Use SOL_TCP instead of getprotobyname() in tests
This is more idiomatic anyway, and works on msan, which misses
interceptors for getprotobyname().
2021-05-07 14:55:18 +02:00
Nikita Popov
7b7a192d76 Merge branch 'PHP-8.0'
* PHP-8.0:
  Remove custom curl build on community job
2021-05-07 12:40:43 +02:00
Nikita Popov
9bf1224d07 Remove custom curl build on community job
This should no longer be necessary now that we're on Ubuntu 20.04.
2021-05-07 12:40:28 +02:00
Nikita Popov
50b4a7adf9 Property handle unset name on ReflectionClassConstant
While the typed property ensures that the value is a string,
we should make sure that we handle an unset property gracefully.

Do this by throwing the same error we would normally throw if
you access an uninitializde typed property.
2021-05-07 12:39:17 +02:00
Nikita Popov
26860c6b6a Fix -Wmaybe-uninitialized warning in intl uchar
This variable can indeed be uninitialized when passed to convert_cp,
though it will not actually be used if uninitialized. This is
still UB though, so let's fix it.
2021-05-07 12:20:16 +02:00
George Peter Banyard
c757c61a8c
Remove unnecessary error handler replacement in SPL
Document why it is needed in the remaining cases
Drive-by refactoring

Closes GH-6955
2021-05-07 11:17:56 +01:00
Nikita Popov
9eb295fc4c Fix -Wreturn-local-addr warning
zend_string_dup() can return the original string if it is interned.
Of course, the string can't be interned here, but GCC doesn't know
that and throws a warning in release builds.

Replace zend_string_dup() (which is a bad API anyway) with a direct
call to zend_string_init(), which makes it more obvious that the
original alloca'd string cannot be reused.
2021-05-07 12:11:52 +02:00
George Peter Banyard
2f1d0f2bc3
Throw directly instead of replacing error handler in ext/date (#6954) 2021-05-07 11:10:39 +01:00
Nikita Popov
b9cfd288e5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Update community, coverage and file cache jobs to Ubuntu 20.04
2021-05-07 11:31:36 +02:00
Nikita Popov
674b884c7a Update community, coverage and file cache jobs to Ubuntu 20.04
This fixes the issue with apt, and seems like a good idea in
general. The msan job is now the only one on 18.04, but that one
needs more work.
2021-05-07 11:29:34 +02:00
Nikita Popov
91dc10c906 Store SplFileObject open_mode as zend_string 2021-05-07 11:23:05 +02:00
Nikita Popov
9602db3b4a Fix open_mode for SplTempFileObject
open_mode was initialized to "wb", but the length set only to 1.
The effect of this was that the stream is opened using "wb", but
we only report "w".

Fix the length to report the actually used open_mode.
2021-05-07 11:18:51 +02:00
Nikita Popov
3b3f6de782 Use zend_string_concat3 in one place
A bit nicer than snprintf + passing the same length around three
times.
2021-05-07 10:43:40 +02:00
Nikita Popov
06e8ed5c86 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix azure build
2021-05-07 10:27:15 +02:00
Nikita Popov
bcea74fd13 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix azure build
2021-05-07 10:26:59 +02:00
Nikita Popov
8deadfa31b Fix azure build
This is only needed on ubuntu-18.04, it works fine on ubuntu-20.04.
2021-05-07 10:26:04 +02:00
Calvin Buckley
207666ee84
Implement server type/version for PDO_ODBC getAttr (#6935)
As an example using the IBM Db2i ODBC driver:

    PDO::ATTR_SERVER_INFO: DB2/400 SQL
    PDO::ATTR_SERVER_VERSION: 07.02.0015
2021-05-06 20:15:13 -05:00
George Peter Banyard
2cd5a200f5
Refactor php_date_initialize_from_hash()
Use early returns
Formalize return type to bool
2021-05-06 21:48:52 +01:00
Ayesh Karunaratne
251da73a9a [skip-ci] Update UPGRADING file with new IMAP namespace
Followed by the bundled extension namespace RFC, #6925 updated the `IMAPConnection` class to `IMAP\Connection`.

This updates the UPGRADING file to reflect that change.
2021-05-06 20:57:56 +01:00
Nikita Popov
ed33262dbb Disable destructors on fuzzer bailout
This is what we normally do for fatal errors. The reason why this
became necessary now, is that a bailout can switch from a fiber
back to the main stack. In that case we do not want to try
destroying the fiber.

Fixes oss-fuzz #33917.
2021-05-06 18:42:38 +02:00
Remi Collet
e5b6f43ec7
get rid of inet_addr usage 2021-05-06 16:32:06 +02:00
Remi Collet
9ba3c367f7
fix litespeed build 2021-05-06 15:57:38 +02:00
K
efe79e0de6
Simplify unpack logic (#6908)
- move endiannes check to compile time
- remove php_unpack function
- the compiler take care of sign extension
2021-05-06 15:20:05 +02:00
Christoph M. Becker
66ad7095b0
Merge branch 'PHP-8.0'
* PHP-8.0:
  Add simple Firebird payload fake server to test suite
2021-05-06 14:51:02 +02:00
Christoph M. Becker
fb2bf8bd58
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add simple Firebird payload fake server to test suite
2021-05-06 14:50:22 +02:00
Christoph M. Becker
f95f8a3c1e
Add simple Firebird payload fake server to test suite
This is meant to test against certain fixed responses of Firebird
servers.  For now we add just a most basic test which verifies a
connection attempt.

Closes GH-6940.
2021-05-06 14:47:57 +02:00
Nikita Popov
9ff8d362b3 Merge branch 'PHP-8.0'
* PHP-8.0:
  opcache: more reliable way to get the current binary on solaris/illumos
2021-05-06 14:34:28 +02:00
David Carlier
d87d2f006c opcache: more reliable way to get the current binary on solaris/illumos
Closes GH-6920.
2021-05-06 14:33:53 +02:00
Remi Collet
f9547f2b47
get rid of inet_aton and inet_ntoa use inet_ntop iand inet_pton where available standardize buffer size 2021-05-06 13:39:58 +02:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00