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

10674 Commits

Author SHA1 Message Date
Nikita Popov
f2c35fdda8 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-17 20:20:43 +01:00
Nikita Popov
2e83082605 Fix bug #74265 2017-03-17 20:19:40 +01:00
Nikita Popov
63e59c75a5 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-16 12:57:36 +01:00
Adam Saponara
98f4ce9363 Return FALSE if error_log fails to write all bytes 2017-03-16 12:56:36 +01:00
Sara Golemon
1a19b97ac3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Detect invalid port in xp_socket parse ip address
2017-03-07 12:11:22 -08:00
Sara Golemon
bab0b99f37 Detect invalid port in xp_socket parse ip address
For historical reasons, fsockopen() accepts the port and hostname
separately: fsockopen('127.0.0.1', 80)

However, with the introdcution of stream transports in PHP 4.3,
it became possible to include the port in the hostname specifier:

fsockopen('127.0.0.1:80')
Or more formally: fsockopen('tcp://127.0.0.1:80')

Confusing results when these two forms are combined, however.
fsockopen('127.0.0.1:80', 443) results in fsockopen() attempting
to connect to '127.0.0.1:80:443' which any reasonable stack would
consider invalid.

Unfortunately, PHP parses the address looking for the first colon
(with special handling for IPv6, don't worry) and calls atoi()
from there.  atoi() in turn, simply stops parsing at the first
non-numeric character and returns the value so far.

The end result is that the explicitly supplied port is treated
as ignored garbage, rather than producing an error.

This diff replaces atoi() with strtol() and inspects the
stop character.  If additional "garbage" of any kind is found,
it fails and returns an error.
2017-03-07 12:10:53 -08:00
Xinchen Hui
48fcc5ddc2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments)
2017-02-23 11:02:37 +08:00
Xinchen Hui
1d4eead995 Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments) 2017-02-23 11:02:23 +08:00
Nikita Popov
c240feb7f4 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-17 18:44:02 +01:00
Benjamin Robin
513582814b Fixed bug #74105
If getrandom syscall is unavailable (ENOSYS), try to fallback on
/dev/urandom.
2017-02-17 18:42:35 +01:00
Nikita Popov
976225ef23 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-16 17:28:05 +01:00
Nikita Popov
cf3ef36323 Fix memory errors in url rewriter
Strings aren't terminated here...
2017-02-16 17:24:07 +01:00
Nikita Popov
f741f9b656 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-16 12:47:12 +01:00
Nikita Popov
5432d6f982 Add json dep to test 2017-02-16 12:45:24 +01:00
Anatol Belski
2a61e5495a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74090 stream_get_contents maxlength>-1 returns empty string
2017-02-15 14:49:58 +01:00
Anatol Belski
89a5bd6750 Fixed bug #74090 stream_get_contents maxlength>-1 returns empty string 2017-02-15 11:22:47 +01:00
Nikita Popov
9fb2812b56 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-12 00:15:46 +01:00
Adam Saponara
7e5cf2aa19 Fixed bug #73118 2017-02-12 00:14:59 +01:00
Nikita Popov
bb9adc4c52 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-08 00:53:36 +01:00
Christian Schmidt
714d825b62 Fix detection of isnan and isinf
The isnan() and isinf() are C99 macros not functions.

Also fix is_infinite(-INF) in case isinf is not defined.
2017-02-08 00:53:18 +01:00
Nikita Popov
546af1966e Merge branch 'PHP-7.0' into PHP-7.1 2017-02-06 01:46:01 +01:00
Nikita Popov
8a8aa67844 Revert "Fix detection of isnan and isinf"
This reverts commit 9ea0949f43.
2017-02-06 01:45:53 +01:00
Nikita Popov
70b27b5ad8 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-05 18:10:04 +01:00
Christian Schmidt
9ea0949f43 Fix detection of isnan and isinf
The isnan() and isinf() are C99 macros not functions.

Also fix is_infinite(-INF) in case isinf is not defined.
2017-02-05 18:09:04 +01:00
Nikita Popov
8660e95b4c Fixed bug #74041 2017-02-03 17:54:39 +01:00
Remi Collet
4fe2758657 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test for 32bits (int -> float)
2017-02-01 10:25:54 +01:00
Remi Collet
aa9742d80d fix test for 32bits (int -> float) 2017-02-01 10:25:30 +01:00
Joe Watkins
2d339fa4d1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug
2017-01-26 09:04:25 +00:00
andrewnester
f65ae82c55 Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug 2017-01-26 09:03:47 +00:00
Joe Watkins
76a7470160 Fixed bug #73994 incorrect arginfo for unpack 2017-01-26 06:58:08 +00:00
Anatol Belski
ec78507bd4 dirname() should not normalize paths
This is the BC piece with the case where dirname() is used with an URL.
2017-01-24 17:56:00 +01:00
Anatol Belski
95406c878a Fixed bug #73962 bug with symlink related to cyrillic directory 2017-01-20 23:45:08 +01:00
Remi Collet
7ea7d3d829 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  NEWS
  Fixed bug #73965 DTrace reported as enabled when disabled
2017-01-20 17:46:24 +01:00
Remi Collet
f81b7df618 Fixed bug #73965 DTrace reported as enabled when disabled 2017-01-20 17:45:15 +01:00
Joe Watkins
bce548d8e6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  DNS CAA record type implementation and tests for https://bugs.php.net/bug.php?id=73850
2017-01-18 17:23:29 +00:00
Marcus Bointon
280e9cb28d DNS CAA record type implementation and tests for https://bugs.php.net/bug.php?id=73850 2017-01-18 17:23:08 +00:00
Stanislav Malyshev
05f2f730e6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73648 - integer overflow in substr
2017-01-16 12:14:03 -08:00
Stanislav Malyshev
d1d002fc4d Fix bug #73648 - integer overflow in substr 2017-01-16 12:11:50 -08:00
Nikita Popov
29433f9fd5 Make unserialize() ref unwrapping compatible with 7.0
Also fix output difference in merged test (unrelated).
2017-01-16 14:25:58 +01:00
Nikita Popov
590ef15f6a Merge branch 'PHP-7.0' into PHP-7.1 2017-01-16 14:12:10 +01:00
Nikita Popov
e0ca519a8b Merge branch 'PHP-5.6' into PHP-7.0 2017-01-16 14:11:41 +01:00
Nikita Popov
6477bb724e Add additional serialize tests for fixed bugs
These have been fixed as a side-effect of the delayed __wakeup
patch.
2017-01-16 13:24:13 +01:00
Tom Sommer
e77a1dbe40 Fix bug #69061
Make mail.log append correct PHP_EOL and remove timestamp when
sending to syslog.
2017-01-14 13:53:09 +01:00
Leigh
4f7b498d12 Fixed bug #73374
Add "0b" prefix detection to intval($str, 0). The implementation
is relatively complicated because we need to handle whitespace and
sign.
2017-01-12 18:53:28 +01:00
Nikita Popov
d1bb306530 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-10 23:19:30 +01:00
Nikita Popov
291e3f0762 Merge branch 'PHP-5.6' into PHP-7.0 2017-01-10 23:19:19 +01:00
Mitch Hagstrand
ad9c552b12 Fix glob-wrapper.phpt to not fail in Windows 2017-01-10 23:18:52 +01:00
Joe Watkins
3c23d1b6d5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  pull-request/1807: 	test for dns_get_record
2017-01-10 13:56:49 +00:00
marcosptf
dcaed51ba0 pull-request/1807:
test for dns_get_record
2017-01-10 13:55:31 +00:00
Sara Golemon
005ba2001d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix open_basedir check for glob:// opendir wrapper
2017-01-09 16:08:08 -08:00