Commit Graph

5573 Commits

Author SHA1 Message Date
Nikita Popov
600dc57f24 Add ext/reflection to execute parser corpus 2021-07-04 12:31:14 +02:00
Christoph M. Becker
970a909caf
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix new test for PHP 8
2021-06-30 16:50:28 +02:00
Christoph M. Becker
9b7b4c47d6
Fix new test for PHP 8 2021-06-30 16:48:31 +02:00
Christoph M. Becker
0189c8b740
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #73630: Built-in Weberver - overwrite $_SERVER['request_uri']
2021-06-30 16:17:02 +02:00
Christoph M. Becker
70b0330e53
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #73630: Built-in Weberver - overwrite $_SERVER['request_uri']
2021-06-30 16:15:50 +02:00
Christoph M. Becker
d7db5701a3
Fix #73630: Built-in Weberver - overwrite $_SERVER['request_uri']
The built-in Webserver's `on_path`, `on_query_string` and `on_url`
callbacks may be called multiple times from the parser; we must not
simply replace the old values, but need to concatenate the new values
instead.

This appears to be tricky for `on_path` due to the path normalization,
so we fail if the function is called again.

The built-in Webserver logs errors during request parsing to stderr,
but this is ignored by the php_cli_server framework, and apparently the
Webserver does not send a resonse at all in such cases (instead of an
4xx).  Thus we can only check that a request with an overly long path
fails.

Closes GH-7207.
2021-06-30 16:13:08 +02:00
Patrick Allaert
aff365871a Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
Joe Watkins
6318040df2
remove specialized printing from phpdbg (#7156) 2021-06-17 14:22:33 +02:00
Nikita Popov
9871a624bf Clean up some more function_exists() checks 2021-06-14 15:47:08 +02:00
Joe Watkins
2c33578c58
Fix #81135 unknown help topic in phpdbg fails assertion 2021-06-13 22:19:14 +02:00
Joe Watkins
766e6b0856
ditch remote 2021-06-13 21:08:35 +02:00
Joe Watkins
cded43fd8d
drop phpdbg web helper extension and wait command (#7144) 2021-06-13 14:02:11 +02:00
Nikita Popov
39131219e8
Migrate more SKIPIF -> EXTENSIONS (#7139)
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00
Nikita Popov
7485978339
Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
Nikita Popov
dd91170ee2 Avoid make_printable_zval() in other printf implementations as well
This is the same as the previous commit, for copies of that code.
2021-06-10 10:19:05 +02:00
David CARLIER
7d5a9dd05d
Litespeed sapi OpenBSD build fix (#3999)
attempt to core dump in the proper place.
implement sendfile
2021-06-09 09:11:54 +02:00
Nikita Popov
1af891306a Fix upload_2G test
Include the new full_path key. This test is skipped on CI but
fails locally.
2021-05-21 16:02:40 +02:00
George Peter Banyard
e7135cb817
Use zend_string_equals_* API in a couple of more place
Closes GH-6979
2021-05-14 13:45:17 +01:00
Nikita Popov
8d409d955f Drop test-phpdbg and clean-phpdbg targets
test-phpdbg doesn't work entirely, and there doesn't seem to be
any cause for having a target that cleans phpdbg in particular.
2021-05-14 12:20:00 +02:00
Nikita Popov
959e5787bd Disable -a mode without readline
To avoid confusing, as -a without readline is not actually
interactive.

Discussion: https://externals.io/message/114426

Closes GH-6976.
2021-05-14 12:10:46 +02:00
Björn Tantau
d764f1dc12
Fix #77372: Retain full path of files for directory uploads (#6917)
To fix https://bugs.php.net/bug.php?id=77372 and improve support of `<input type="file" name="files" multiple webkitdirectory>` I introduced another item to the `$_FILES` array called `full_path`, containing the full filename, as supplied by the user-agent.

Co-authored-by: Björn Tantau <bjoern@bjoern-tantau.de>
2021-05-14 11:43:55 +02:00
George Peter Banyard
ff988a6f4f
Fix remaining [-Wstrict-prototypes] warnings
Two missing void qualifiers for parameter list.
2021-05-12 19:02:48 +01:00
George Peter Banyard
c40231afbf
Mark various functions with void arguments.
This fixes a bunch of [-Wstrict-prototypes] warning,
because in C func() and func(void) have different semantics.
2021-05-12 14:55:53 +01:00
Nikita Popov
07061482a0 Fix segfault in php -a without readline 2021-05-11 11:39:04 +02:00
Joe Watkins
8b8c8fd79c
Merge branch 'PHP-8.0'
* PHP-8.0:
  missing ;
2021-05-11 11:11:35 +02:00
Joe Watkins
33a93b5ed7
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  missing ;
2021-05-11 11:10:52 +02:00
Joe Watkins
ef3e0ee08a
missing ; 2021-05-11 11:10:38 +02:00
Joe Watkins
3318dcc8ef
Merge branch 'PHP-8.0'
* PHP-8.0:
  php-fpm: fix Solaris port events.mechanism
2021-05-11 11:08:35 +02:00
Joe Watkins
6ccbaa12e0
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  php-fpm: fix Solaris port events.mechanism
2021-05-11 11:07:47 +02:00
Petr Sumbera
04078a597c
php-fpm: fix Solaris port events.mechanism
Bug #65800
Fix by: rainer.jung@kippdata.de
2021-05-11 11:01:38 +02: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
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
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
Michael Voříšek
4d78598e8e Remove spaces around version built type 2021-04-27 10:12:28 +02:00
Christoph M. Becker
3bb62eee5b
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #67792: HTTP Authorization schemes are treated as case-sensitive
2021-04-23 15:58:21 +02:00
Christoph M. Becker
23a192d12d
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #67792: HTTP Authorization schemes are treated as case-sensitive
2021-04-23 15:57:11 +02:00
Christoph M. Becker
39ddf6b89c
Fix #67792: HTTP Authorization schemes are treated as case-sensitive
We use `zend_binary_strncasecmp()` to avoid any locale issues, and
refactor.  We also add a test case for Digest authentication.

Closes GH-6900.
2021-04-23 15:54:17 +02:00
Nikita Popov
b66eb866c9 Convert last_error_file to zend_string 2021-04-23 11:05:14 +02:00
Máté Kocsis
30a082cb16
Make some exception properties typed
Closes GH-6891
2021-04-22 10:22:50 +02:00
Nikita Popov
31b6f842cc Merge branch 'PHP-8.0'
* PHP-8.0:
  PHPDBG: fix bug parsing 3-word opcodes
2021-04-22 10:12:47 +02:00
Nikita Popov
b0f030509a Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  PHPDBG: fix bug parsing 3-word opcodes
2021-04-22 10:12:25 +02:00
David Rans
054fad6d63 PHPDBG: fix bug parsing 3-word opcodes
PHPDBG won't parse opcodes correctly if they are more than two words
separated by underscores (as many opcodes, like ZEND_POST_INC, are).

Now opcodes that have more than one underscore (e.g. ZEND_POST_INC) are
parsed correctly.

Closes GH-6895.
2021-04-22 10:11:26 +02:00
Máté Kocsis
533a6bcb29
Get rid of private final methods (#6892) 2021-04-21 10:08:25 +02:00
Christoph M. Becker
8667dc92aa
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix misleading error message
2021-04-20 15:45:26 +02:00
Christoph M. Becker
0f40426450
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix misleading error message
2021-04-20 15:43:04 +02:00
Christoph M. Becker
263f14ac60
Fix misleading error message
Closes GH-6889.
2021-04-20 15:41:42 +02:00
Nikita Popov
dfe8dbdc0d Destroy file handle earlier in execute fuzzer
I'm not quite sure why this is relevant, but if matches what other
code does and fixes oss-fuzz #32517.
2021-04-15 12:55:58 +02:00
Nikita Popov
0c7cdbbaba Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix return type of sparc atomic helper
2021-04-13 14:37:26 +02:00