1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 04:51:03 +02:00
Commit Graph

117571 Commits

Author SHA1 Message Date
Nikita Popov
cc704f5bb6 Reduce code duplication in HTTP header checks 2020-02-24 09:58:29 +01:00
Nikita Popov
ce2abdd42e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixes #79265: Improper injection of Host header when using fopen for http requests
2020-02-24 09:51:55 +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
6c7306f45d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79299: com_print_typeinfo prints duplicate variables
2020-02-23 23:35:33 +01:00
Christoph M. Becker
09e7c86779 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79299: com_print_typeinfo prints duplicate variables
2020-02-23 23:34:15 +01:00
Christoph M. Becker
9e6358af36 Fix #79299: com_print_typeinfo prints duplicate variables
`lastid` has to retain its value during the traversal, so we move it to
an outer scope.

Patch contributed by Litiano Moura.
2020-02-23 23:31:36 +01:00
Jakub Zelenka
736b1ab200 Merge branch 'PHP-7.4' 2020-02-23 19:15:05 +00:00
Jakub Zelenka
578a8113eb Fix bug #79014 (PHP-FPM & Primary script unknown) 2020-02-23 19:14:05 +00:00
Jakub Zelenka
ee0579350f Merge branch 'PHP-7.4' 2020-02-23 18:32:20 +00:00
Jakub Zelenka
0bc6a66a7a Fix bug #77653 (operator displayed instead of the real error message) 2020-02-23 18:29:10 +00:00
George Peter Banyard
0aad7999e7 Update Travis build config
The sudo key is deprecated and doesn't do anything anymore.

Adding the "os" key with default value "linux" which was assumed to the build config.
2020-02-23 03:27:05 +01:00
George Peter Banyard
6e40ec7de9 Second go at fixing [-Wmissing-field-initializers] compiler warning in PDO
By 0 initializing the sub structs
2020-02-22 01:01:07 +01:00
Nikita Popov
1892def3a8 Add rand() to ext/standard stub 2020-02-21 16:27:59 +01:00
Christoph M. Becker
3e1ac7e968 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79294: ::columnType() may fail after SQLite3Stmt::reset()
2020-02-21 13:39:05 +01:00
Christoph M. Becker
2a76e3a457 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79294: ::columnType() may fail after SQLite3Stmt::reset()
2020-02-21 13:37:31 +01:00
Christoph M. Becker
f133f0024e Fix #79294: ::columnType() may fail after SQLite3Stmt::reset()
The fix for feature request #53466 did not properly handle resetting of
the corresponding statement; the problem with this is that the
statement does not know about its result sets.  But even if we could
fix this, the `complete` handling still appears to be brittle, since
the `sqlite3_column_type()`docs[1] state:

| If the SQL statement does not currently point to a valid row, or if
| the column index is out of range, the result is undefined.

Fortunately, we can use `sqlite3_data_count()` instead, since[2]:

| If prepared statement P does not have results ready to return (via
| calls to the sqlite3_column() family of interfaces) then
| sqlite3_data_count(P) returns 0.

Thus, we guard `SQLite3::columnType()` with `sqlite3_data_count()`, and
completely drop updating the `php_sqlite3_result_object.complete`
field, but keep it for ABI BC purposes.

[1] <https://www.sqlite.org/c3ref/column_blob.html>
[2] <https://www.sqlite.org/c3ref/data_count.html>
2020-02-21 13:36:29 +01:00
George Peter Banyard
363d87f256 Fix [-Wmissing-field-initializers] compiler warning in mbstring
Add missing NULL pointer for mbfl_convert_vtbl struct.
2020-02-21 13:19:09 +01:00
Nikita Popov
a87bfdfd25 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't use asm arithmetic under msan
2020-02-21 11:58:59 +01:00
Nikita Popov
5a5680c25b Don't use asm arithmetic under msan
Clang 9 supports asm goto, so these no longer get automatically
skipped.

(cherry picked from commit 33bf1495b2)
2020-02-21 11:58:52 +01:00
Christoph M. Becker
a21cdb88ac Merge branch 'PHP-7.4'
* PHP-7.4:
  Add test for bug #78569
2020-02-21 10:34:27 +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
Nikita Popov
d1d87dcd6f Merge branch 'PHP-7.4'
* PHP-7.4:
  Update Ubuntu version on Azure
2020-02-21 10:12:45 +01:00
Nikita Popov
2b50d905df Update Ubuntu version on Azure
The i386 and community jobs were still on 16.04, update them to
18.04.
2020-02-21 10:12:31 +01:00
Nikita Popov
ac51a5f02a Make SPL doubly linked list smaller
Store rc in data u2. This drops element size from 40 to 32 bytes.
2020-02-21 09:54:18 +01:00
Máté Kocsis
f031735489 Update UPGRADING
[skip ci]
2020-02-20 11:13:24 +01:00
Christoph M. Becker
802391fa3f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix NEWS [ci skip]
2020-02-20 10:59:05 +01:00
Christoph M. Becker
1b2e6cb3f5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix NEWS [ci skip]
2020-02-20 10:57:41 +01:00
Christoph M. Becker
ab5b6702d7 Fix NEWS [ci skip]
Cosmetics.
2020-02-20 10:55:17 +01:00
Máté Kocsis
c231bbb852 Remove restore_include_path()
Closes GH-5189
2020-02-20 09:11:36 +01:00
Bishop Bettini
fb57ae9084 Improve comment on RFC 1867 filename handling
It was pointed out on the internals ML[1] that the basename comment
around RFC 1867 file handling was confusing. The comment seemed to
say that the basename handling was only necessary because of some
esoteric bug in Windows IE. In fact that comment applied to earlier
versions of the code and was, therefore, misleading. The comment
needs to clear that basename is required per RFC 7578[2].

[1]:https://externals.io/message/108624
[2]:https://tools.ietf.org/html/rfc7578
2020-02-19 11:30:32 -05:00
Máté Kocsis
4f89211810 Remove the deprecated reflection export methods
Closes GH-5188
2020-02-19 13:19:37 +01:00
Nikita Popov
318fe06042 Create memory stream in exif fuzzer
At least one segfault observed because temp file creation failed.
Switch to using a memory stream, which should be more robust, and
more efficient for that matter.
2020-02-19 10:24:12 +01:00
Nikita Popov
28a30f7afa Handle static return type in AST printer
Fixes OSS-Fuzz #20782.
2020-02-19 09:45:41 +01:00
Máté Kocsis
736b22dc0b Add stubs for aliases
Closes GH-5187
2020-02-18 21:10:36 +01:00
Nikita Popov
172010a08d Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't use VLA in mysqlnd auth
2020-02-18 16:18:50 +01:00
Nikita Popov
9d31a42a30 Don't use VLA in mysqlnd auth
We use alloca instead of VLA. This should also allow building
this code on Windows.
2020-02-18 16:17:56 +01:00
Nikita Popov
7a062cf9cd Handle EXIF offsets in a principled manner
exif_process_IFD_TAG() currently accepts a dir_entry, offset_base
and IFDlength. However, it's very hard to follow how these values
are related to each other and the addressable memory region. As we
add additional bounds check, this gets further confused.

One of the basic cases is where dir_entry is in
[offset_base, offset_base+IFDlength), in which case the memory
[dir_entry, offset_base+IFDlength) is valid, but the memory
[offset_base, dir_entry) is not necessarily valid. I wasn't able
to understand what exactly is valid if dir_entry is outside
[offset_base, offset_base+IFDlength)

This patch changes everything to use a struct that separately stores
offset_base and the valid memory region and adds helpers to fetch
offsets and check that pointers are in-bounds.

Closes GH-5068.
2020-02-18 15:17:38 +01:00
Nikita Popov
3b08f53c97 Deprecate required param after optional
As an exception, we allow "Type $foo = null" to occur before a
required parameter, because this pattern was used as a replacement
for nullable types in PHP versions older than 7.1.

Closes GH-5067.
2020-02-18 14:35:58 +01:00
Christoph M. Becker
9d79e510d5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove extra tab in NEWS [ci skip]
2020-02-18 11:12:08 +01:00
Christoph M. Becker
f6fcc5c353 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Remove extra tab in NEWS [ci skip]
2020-02-18 11:10:51 +01:00
Christoph M. Becker
31dd45564c Remove extra tab in NEWS [ci skip] 2020-02-18 11:09:37 +01:00
Remi Collet
e845b1908b Merge branch 'PHP-7.4'
* PHP-7.4:
  bump version to 7.2.29
2020-02-18 11:01:21 +01:00
Remi Collet
9f8c32cced Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  bump version to 7.2.29
2020-02-18 11:01:07 +01:00
Remi Collet
2aecf3aba9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  bump version to 7.2.29
2020-02-18 11:00:49 +01:00
Remi Collet
63f6608f89 bump version to 7.2.29 2020-02-18 11:00:28 +01:00
Nikita Popov
abfdfc9ff8 Add return types to FFI methods
The FFI class is final, so we can use proper return types.
2020-02-18 10:28:43 +01:00
Nikita Popov
328903ca36 Add proper return types to final phar methods
As these are final, we can add return types to them.
2020-02-18 10:20:21 +01:00
Nikita Popov
541f8b7640 Remove mysqli reflection tests 2020-02-18 10:08:03 +01:00