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

10696 Commits

Author SHA1 Message Date
Sara Golemon e628ee9e9d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bugfix #74556 stream_socket_get_name() returns empty string
  Fix abstract name handling to be binary safe
2017-05-28 08:49:25 -07:00
Sara Golemon 8dcfec9789 Bugfix #74556 stream_socket_get_name() returns empty string
The original bug report had it returning '\0',
but with a fix to abstract name handling (6d2d0bbda7)
it now actually returns ''.

Neither of these are good, as per unix(7)
an empty socket name indicates an unbound name
and "should not be inspected".
2017-05-28 08:48:18 -07:00
Sara Golemon d9458aac9d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bugfix #74598 ftp:// ignores context
2017-05-27 21:14:02 -07:00
Sara Golemon 05849a242a Bugfix #74598 ftp:// ignores context 2017-05-27 21:12:49 -07:00
Anatol Belski b73a73da25 fix test 2017-05-16 15:09:02 +02:00
Anatol Belski 71f8c4dcfd add test for bug #74589 2017-05-16 14:25:27 +02:00
Sara Golemon 90bd4be3f9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove typo from test header
2017-05-10 16:50:37 -07:00
Sara Golemon b8e0351978 Remove typo from test header 2017-05-10 16:50:19 -07:00
Anatol Belski 023cbdb2ca Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Tests to ensure BC with undocumented behavior used in hacks
2017-05-01 18:06:09 +02:00
Anatol Belski a581e64199 Tests to ensure BC with undocumented behavior used in hacks
Should become obsolete, once behaviors change.
2017-05-01 18:01:05 +02:00
Anatol Belski 392bcba58d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Detect invalid port in xp_socket parse ip address"
  Revert "Follow up patch regarding bug #74216, see bug #74429"
2017-04-27 11:11:41 +02:00
Anatol Belski 09ef61e3ca Revert "Detect invalid port in xp_socket parse ip address"
This reverts commit bab0b99f37.
2017-04-27 02:49:12 +02:00
Sebastian Bergmann 25c941807b Merge branch 'PHP-7.0' into PHP-7.1 2017-04-11 08:28:55 +02:00
Sebastian Bergmann 7cdf520319 Fix bug #74409 2017-04-11 08:27:17 +02:00
Xinchen Hui 65d77812fc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed condition check
2017-04-10 14:47:42 +08:00
Xinchen Hui 4bebcb84ad Fixed condition check 2017-04-10 14:47:24 +08:00
Nikita Popov 84ef6fa80d Merge branch 'PHP-7.0' into PHP-7.1 2017-04-09 13:14:57 +02:00
Craig Duncan ba6561d3cc Fixed bug #72071: Prevent Max-Age from being negative 2017-04-09 13:14:40 +02:00
Nikita Popov c8034514ed Fixed bug #74361 2017-04-02 13:19:32 +02:00
x-xiang e9e860a05b Don't retain mt_rand() seeds across requests
In particular, this prevents manual seeding of mt_rand() to leak
across requests.
2017-03-27 19:02:39 +02:00
Anatol Belski 9e3672eaef Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  explicitly ignore php.ini for proc open tests
2017-03-21 12:44:36 +01:00
Anatol Belski bc2b500d3e explicitly ignore php.ini for proc open tests
In some cases, when an environment is unclean, tests might get stuck fe
when some incorrect ini file is loaded. As the test depends on the core
only, it is safer to explicitly ignore the ini. Any ini can be passed in
the cmd itself, if needed.
2017-03-21 12:39:40 +01:00
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