1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 00:53:30 +02:00
Commit Graph

114476 Commits

Author SHA1 Message Date
Nikita Popov
8ba0624a09 Downgrade server security level in security level test
We want to test the client side error here, so make sure the
server side can start up successfully.
2020-06-18 15:54:02 +02:00
Nikita Popov
c7fe71c8b7 Add SubjectAltName support to certificate generator
And switch tests using SAN certificates to the generator.

This is ugly, but there doesn't seem to be a more direct way
to privide SAN in PHP.
2020-06-18 15:49:08 +02:00
Christoph M. Becker
acdd6e597d Add missing NEWS entry
I forgot to update NEWS after merging back then.
2020-06-18 15:28:19 +02:00
Nikita Popov
72b3987c2d Generate certificates for bug69215.phpt 2020-06-18 14:58:48 +02:00
Nikita Popov
58ca47aff6 Generate certificate for bug68920.phpt
The certificate really doesn't matter here, but it still needs to
comply with security level...
2020-06-18 14:49:15 +02:00
Nikita Popov
dd7d161ccf Generate certificate for bug65729.pem
Make this test pass under security level 2.
2020-06-18 14:43:57 +02:00
Nikita Popov
2c0d47c4b4 Revert "Fix tests regarding OpenSSL security_level"
This reverts commit b281493503.
2020-06-18 14:22:20 +02:00
Nikita Popov
51e3cb3916 Don't generate spurious warning is security_level not supported
People should not have to worry about the used openssl version
when downgrading security_level.
2020-06-18 14:21:53 +02:00
Christoph M. Becker
b281493503 Fix tests regarding OpenSSL security_level
The `security_level` stream option is only available as of OpenSSL
1.1.0, so we only set it for these versions.  Older OpenSSL versions
do not have security levels at all.
2020-06-18 13:28:09 +02:00
Nikita Popov
6b702eea15 Migrate some tests to certificate generator
This migrates all the tests using ext/openssl/tests/streams_crypto_method.pem
to the certificate generator, so we can easily adjust needed parameters.
In particular, this makes the cert security level 2 compatible.

However, we still need to downgrade security_level to 1 in a number
of tests, because they are testing TLS < 1.2 connections.
2020-06-18 10:49:36 +02:00
Nikita Popov
3dfa25833f Don't use ternary in ini default
We use sizeof() on ini defaults, so this isn't safe. I can't reproduce
the failures locally, but I expect this to fix the asan jobs.
2020-06-18 10:15:53 +02:00
Nikita Popov
4c899fba41 Remove bug48187.phpt
Saw a spurious failure from this one on azure macos, presumably
the process got interrupted in the middle and waited for more than
one second to resume.

After looking a bit more closely, this test doesn't actually test
what bug #48187 reported, because there is no DateTime::diff()
anywhere to be found. This test was also added speculatively,
because the root cause was never diagnosed, and the problems seems
to have resolved itself at some point.

As such, I'm simply dropping this test, rather than figuring out
how to make it more robust.
2020-06-18 10:07:45 +02:00
Nikita Popov
52c2f1126d Use sha256 as digest algorithm in certificate generator
This makes the generated certificates compatible with security
level 2, which is apparently the default on Ubuntu 20.04.

Unfortunately this does not fix all tests, because some are using
pre-generated certificates.
2020-06-17 22:15:00 +02:00
Nikita Popov
9b3e57921f Suppress zend signals check in two readline tests
Installing a callback handler may cause libedit to register new
signals during the request.
2020-06-17 17:13:01 +02:00
Nikita Popov
3d6199db8a Add mbregex skipif 2020-06-17 09:35:02 +02:00
Nikita Popov
3f2f36d5d4 Fix non-default syntax in mb_ereg_search() 2020-06-16 14:31:29 +02:00
Christoph M. Becker
59e343c779 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes
2020-06-13 18:32:15 +02:00
Christoph M. Becker
5621c5faf8 Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes
Even if the length of a maker note does not match our expectations
(either because the maker note is corrupted, or because our
expectations do not quite match reality), there is no need to let
parsing fail; we can still go on parsing the other meta information.
2020-06-13 18:30:57 +02:00
Nikita Popov
8641d76f62 Drop freetype from i386
For some reason this seems to pick up the amd64 library (though
we do install the i386 one).
2020-06-12 15:41:05 +02:00
Nikita Popov
e0d2070108 Use shared setup.yml on azure
Make sure things stay synchronized between different x64 jobs.
2020-06-12 15:41:00 +02:00
Christoph M. Becker
ff7fd3dc85 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79676: imagescale adds black border with IMG_BICUBIC
2020-06-12 14:07:43 +02:00
Christoph M. Becker
86e1f0ea11 Fix #79676: imagescale adds black border with IMG_BICUBIC
We have to loop over all image pixels to avoid the black border.  This
is also done in external libgd in `_gdScaleOneAxis` and `_gdScalePass`.
2020-06-12 14:05:54 +02:00
Nikita Popov
09532a12a6 Suppress deprecation warning in sockets.c
This one was quite a journey...
2020-06-12 12:35:02 +02:00
Anatol Belski
2fd278bc21 sqlite3: Fix possible use after free
Exception should be thrown before the db handle is destroyed.
The backtrace excerpt

==26628== Invalid read of size 4
==26628==    at 0x53C49E3: sqlite3_errmsg (in /usr/lib64/libsqlite3.so.0.8.6)
==26628==    by 0x38C4E9: zim_sqlite3_open (sqlite3.c:142)
==26628==    by 0x8977BF: ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:1618)
==26628==    by 0x8F801E: execute_ex (zend_vm_execute.h:53824)
==26628==    by 0x8FC0BB: zend_execute (zend_vm_execute.h:57920)
==26628==    by 0x828F54: zend_execute_scripts (zend.c:1672)
==26628==    by 0x793C2C: php_execute_script (main.c:2621)
==26628==    by 0x8FEA44: do_cli (php_cli.c:964)
==26628==    by 0x8FF9DC: main (php_cli.c:1359)

Signed-off-by: Anatol Belski <ab@php.net>
2020-06-11 13:12:10 +02:00
Christoph M. Becker
2a6f2d82e1 Update NEWS wrt. bug 79681 2020-06-10 16:44:17 +02:00
Christoph M. Becker
6747068ce7 Fix #79681: mime_content_type/finfo returning incorrect mimetype
We backport the respective fix for MP3s[1].

[1] <5a55569a35>
2020-06-10 16:36:40 +02:00
Nikita Popov
1905cf0656 Explicitly start postgres on azure
Seems to be necessary now...
2020-06-10 14:09:47 +02:00
Christoph M. Becker
c5bafc3a19 Also support absolute Windows filenames
The output normalization of bless_tests.php only detected absolute Unix
filenames; we extend this for absolute Windows filenames, regardless of
the platform we're running on (tests may have been run on Windows, but
bless_tests.php may be run from WSL or a Linux VM, for instance).
2020-06-10 12:11:13 +02:00
Xinchen Hui
a297c09da5 Partial fixed bug #79649 (Altering disable_functions from module init corrupts memory)
In module startup stage, we should not initiliaze
EG(modified_ini_directives) as it use zend MM, the zend MM will be
restart at the end of modules startup stage,

by say "partial", because this issue still exists if altering ZEND_USER
inis, we should add a zend_ini_deactive at the end of modules startup
stage, but it brings some new cost, and I think no one would do things
like that
2020-06-10 11:16:42 +08:00
Christoph M. Becker
3c12c41927 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix possibly unsupported timercmp() usage
2020-06-09 16:54:43 +02:00
Christoph M. Becker
7ac0fb5ae4 Fix possibly unsupported timercmp() usage
The `timercmp()` manpage[1] points out that some systems have a broken
implementation which does not support `>=`.  This is definitely the
case for the Windows SDK, which only supports `<` and `>`.

[1] <https://linux.die.net/man/3/timercmp>
2020-06-09 16:52:19 +02:00
Christoph M. Becker
85657b486f Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #62890: default_socket_timeout=-1 causes connection to timeout
2020-06-09 16:47:00 +02:00
Christoph M. Becker
eadd980706 Fix #62890: default_socket_timeout=-1 causes connection to timeout
While unencrypted connections ignore negative timeouts, SSL/TLS
connections did not special case that, and so always failed due to
timeout.
2020-06-09 16:45:34 +02:00
Christoph M. Becker
5d3da2e748 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  [ci skip] Update NEWS
2020-06-09 16:39:34 +02:00
Christoph M. Becker
eac700b1e6 [ci skip] Update NEWS 2020-06-09 16:37:17 +02:00
Nikita Popov
2447fd9f84 Fixed bug #79683
Reset fake_scope during __toString() call.

I'll check if we can solve this more globally in master, by
resetting fake_scope in zend_call_function.
2020-06-09 15:51:05 +02:00
Christoph M. Becker
ee4683cf28 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #74267: segfault with streams and invalid data
2020-06-08 23:22:49 +02:00
Christoph M. Becker
12c59f6660 Fix #74267: segfault with streams and invalid data
If the current character is a line break character, it cannot be a tab
or space character, so we would always fail with an invalid sequence
error.  Obviously, these `scan_stat == 4` conditions are meant to be
exclusive.

Furthermore, if `in_pp == NULL || in_left_p == NULL` is true, we hit a
segfault if we are not returning right away.  Obviously, the additional
constraints don't make sense, so we remove them.
2020-06-08 23:19:43 +02:00
Nikita Popov
df2db7fcea Fixed bug #79657
Throwing an exception should count as an initialization for this
purpose.
2020-06-08 11:31:28 +02:00
Nikita Popov
9b39ddbb85 Disable mysqlnd compression on msan build
This recently got enabled when detection was fixed. However,
we don't want this for msan builds, because our zlib is not
instrumented.
2020-06-08 10:35:05 +02:00
Jelle van der Waa
d21b1c5679 Allow defining of uname value for reproducible builds
Extend configure.ac to accept PHP_UNAME as env variable to set the value of the
PHP_UNAME define in a reproducible manner. This allows distributions to set a
fixed value for php_uname and keep the default behaviour if PHP_UNAME is not
set.

Motivation: https://reproducible-builds.org/

Closes GH-5671.
2020-06-07 10:38:43 +02:00
Nikita Popov
4902b1c554 Remove unnecessary "poo" rmdirs
"poo" was only used in the opendir_edgecases test, but rmdir'ed
in some other tests as well.

I've also taken the liberty of renaming this directory...
2020-06-05 16:26:09 +02:00
Christoph M. Becker
46d2a981dd Update intl test suite for ICU 67.1
Cherry-picked from c915c60171.
2020-06-05 10:51:51 +02:00
Nathan Porter
ca7dcb88f3 Respect --program-prefix/suffix when installing phar
Currently ./configure --enable-phar --program-suffix=7.4 will
result in binaries named php7.4 and phar but should instead
result in php7.4 and phar7.4

Closes GH-5650.
2020-06-05 10:10:40 +02:00
Christoph M. Becker
d65c85366d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #73527: Invalid memory access in php_filter_strip
2020-06-04 13:38:45 +02:00
Christoph M. Becker
ceae81665c Fix #73527: Invalid memory access in php_filter_strip 2020-06-04 13:37:11 +02:00
talyz
a230717fbb mysqlnd: Remove unnecessary check for HAVE_ZLIB
If MYSQLND_COMPRESSION_WANTED is set, we already guarantee that
zlib is linked, but don't necessarily set HAVE_ZLIB.

Closes GH-5658.
2020-06-04 10:01:17 +02:00
Christoph M. Becker
5e38a1b352 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79668: get_defined_functions(true) may miss functions
2020-06-04 09:00:01 +02:00
Christoph M. Becker
b8e7b30b47 Fix #79668: get_defined_functions(true) may miss functions
Instead of some brittle and unefficient string matching, we can just
check for the function handler.
2020-06-04 08:45:27 +02:00
Nikita Popov
39111585a2 Report len as -1 instead of INT_MAX
Per docs it should be -1. And would be on 32-bit systems, but
not on 64-bit systems.
2020-06-03 10:15:54 +02:00