mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-10 02:30:50 +00:00
Compare commits
11
Commits
php-7.4.14
...
php-5.6.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae15e636e2 | ||
|
|
de991c88aa | ||
|
|
d351bf34d0 | ||
|
|
3d91d3477b | ||
|
|
9d55c29b48 | ||
|
|
a90dc7c559 | ||
|
|
71335e6eba | ||
|
|
09c5ab45a4 | ||
|
|
296d03cbf7 | ||
|
|
f457487e16 | ||
|
|
7535735414 |
No files matched your search
@@ -1,21 +1,26 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? Feb 2015, PHP 5.6.6
|
||||
19 Feb 2015, PHP 5.6.6
|
||||
|
||||
- Core:
|
||||
. Removed support for multi-line headers, as the are deprecated by RFC 7230.
|
||||
(Stas)
|
||||
. Fixed bug #67068 (getClosure returns somethings that's not a closure).
|
||||
(Danack at basereality dot com)
|
||||
. Fixed bug #68942 (Use after free vulnerability in unserialize() with
|
||||
DateTimeZone). (CVE-2015-0273) (Stas)
|
||||
. Fixed bug #68925 (Mitigation for CVE-2015-0235 – GHOST: glibc gethostbyname
|
||||
buffer overflow). (Stas)
|
||||
. Fixed Bug #67988 (htmlspecialchars() does not respect default_charset
|
||||
specified by ini_set) (Yasuo)
|
||||
. Added NULL byte protection to exec, system and passthru. (Yasuo)
|
||||
|
||||
- Dba:
|
||||
. Fixed bug #68711 (useless comparisons). (bugreports at internot dot info)
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #50224 (json_encode() does not always encode a float as a float)
|
||||
by adding JSON_PRESERVE_ZERO_FRACTION. (Juan Basso)
|
||||
- Enchant:
|
||||
. Fixed bug #68552 (heap buffer overflow in enchant_broker_request_dict()).
|
||||
(Antony)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #68827 (Double free with disabled ZMM). (Joshua Rogers)
|
||||
@@ -30,20 +35,26 @@
|
||||
(redfoxli069 at gmail dot com, Laruence)
|
||||
|
||||
- JSON:
|
||||
. Fixed bug #68938 (json_decode() decodes empty string without error).
|
||||
(jeremy at bat-country dot us)
|
||||
. Fixed bug #50224 (json_encode() does not always encode a float as a float)
|
||||
by adding JSON_PRESERVE_ZERO_FRACTION. (Juan Basso)
|
||||
|
||||
- LIBXML:
|
||||
. Fixed bug #64938 (libxml_disable_entity_loader setting is shared
|
||||
between threads). (Martin Jansen)
|
||||
|
||||
- Mysqli:
|
||||
. Fixed bug #68114 (linker error on some OS X machines with fixed
|
||||
width decimal support) (Keyur Govande)
|
||||
. Fixed bug #68657 (Reading 4 byte floats with Mysqli and libmysqlclient
|
||||
has rounding errors) (Keyur Govande)
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug with try blocks being removed when extended_info opcode
|
||||
generation is turned on. (Laruence)
|
||||
|
||||
- PDO_mysql:
|
||||
. Fixed bug #68750 (PDOMysql with mysqlnd does not allow the usage of
|
||||
named pipes). (steffenb198@aol.com)
|
||||
named pipes). (steffenb198 at aol dot com)
|
||||
|
||||
- Phar:
|
||||
. Fixed bug #68901 (use after free). (bugreports at internot dot info)
|
||||
@@ -63,12 +74,8 @@
|
||||
- Standard:
|
||||
. Fixed bug #65272 (flock() out parameter not set correctly in windows).
|
||||
(Daniel Lowrey)
|
||||
|
||||
- Mysqli:
|
||||
. Fixed bug #68114 (linker error on some OS X machines with fixed
|
||||
width decimal support) (Keyur Govande)
|
||||
. Fixed bug #68657 (Reading 4 byte floats with Mysqli and libmysqlclient
|
||||
has rounding errors) (Keyur Govande)
|
||||
. Fixed bug #69033 (Request may get env. variables from previous requests
|
||||
if PHP works as FastCGI). (Anatol)
|
||||
|
||||
- Streams:
|
||||
. Fixed bug which caused call after final close on streams filter. (Bob)
|
||||
@@ -90,7 +97,7 @@
|
||||
. Fixed bug #68583 (Crash in timeout thread). (Anatol)
|
||||
. Fixed bug #65576 (Constructor from trait conflicts with inherited
|
||||
constructor). (dunglas at gmail dot com)
|
||||
. Fixed bug #68676 (Explicit Double Free). (Kalle)
|
||||
. Fixed bug #68676 (Explicit Double Free). (CVE-2014-9425) (Kalle)
|
||||
. Fixed bug #68710 (Use After Free Vulnerability in PHP's unserialize()).
|
||||
(CVE-2015-0231) (Stefan Esser)
|
||||
|
||||
@@ -301,6 +308,9 @@
|
||||
(Matteo, Alain Laporte)
|
||||
. Fixed bug #66584 (Segmentation fault on statement deallocation) (Matteo)
|
||||
|
||||
- OpenSSL:
|
||||
. Revert regression introduced by fix of bug #41631
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #68103 (Duplicate entry in Reflection for class alias). (Remi)
|
||||
|
||||
@@ -567,7 +577,7 @@
|
||||
. Fixed bug #67606 (revised fix 67541, broke mod_fastcgi BC). (David Zuelke)
|
||||
. Fixed bug #67530 (error_log=syslog ignored). (Remi)
|
||||
. Fixed bug #67635 (php links to systemd libraries without using pkg-config).
|
||||
(pacho@gentoo.org, Remi)
|
||||
(pacho at gentoo dot org, Remi)
|
||||
. Fixed bug #67531 (syslog cannot be set in pool configuration). (Remi)
|
||||
. Fixed bug #67541 (Fix Apache 2.4.10+ SetHandler proxy:fcgi://
|
||||
incompatibilities). (David Zuelke)
|
||||
@@ -969,7 +979,7 @@
|
||||
|
||||
- FPM:
|
||||
. Fixed bug #67635 (php links to systemd libraries without using pkg-config).
|
||||
(pacho@gentoo.org, Remi)
|
||||
(pacho at gentoo dot org, Remi)
|
||||
|
||||
- GD:
|
||||
. Fixed bug #66901 (php-gd 'c_color' NULL pointer dereference).
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=6
|
||||
PHP_RELEASE_VERSION=6
|
||||
PHP_EXTRA_VERSION="-dev"
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
|
||||
+11
-12
@@ -163,7 +163,7 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_create_from_format, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, format)
|
||||
ZEND_ARG_INFO(0, time)
|
||||
ZEND_ARG_OBJ_INFO(0, object, DateTimeZone, 1)
|
||||
ZEND_ARG_INFO(0, object)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_parse, 0, 0, 1)
|
||||
@@ -2807,12 +2807,9 @@ static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht
|
||||
timelib_tzinfo *tzi;
|
||||
php_timezone_obj *tzobj;
|
||||
|
||||
if (zend_hash_find(myht, "date", 5, (void**) &z_date) == SUCCESS) {
|
||||
convert_to_string(*z_date);
|
||||
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS) {
|
||||
convert_to_long(*z_timezone_type);
|
||||
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
|
||||
convert_to_string(*z_timezone);
|
||||
if (zend_hash_find(myht, "date", 5, (void**) &z_date) == SUCCESS && Z_TYPE_PP(z_date) == IS_STRING) {
|
||||
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS && Z_TYPE_PP(z_timezone_type) == IS_LONG) {
|
||||
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS && Z_TYPE_PP(z_timezone) == IS_STRING) {
|
||||
|
||||
switch (Z_LVAL_PP(z_timezone_type)) {
|
||||
case TIMELIB_ZONETYPE_OFFSET:
|
||||
@@ -2827,7 +2824,6 @@ static int php_date_initialize_from_hash(php_date_obj **dateobj, HashTable *myht
|
||||
|
||||
case TIMELIB_ZONETYPE_ID: {
|
||||
int ret;
|
||||
convert_to_string(*z_timezone);
|
||||
|
||||
tzi = php_date_parse_tzfile(Z_STRVAL_PP(z_timezone), DATE_TIMEZONEDB TSRMLS_CC);
|
||||
|
||||
@@ -3744,9 +3740,8 @@ static int php_date_timezone_initialize_from_hash(zval **return_value, php_timez
|
||||
zval **z_timezone = NULL;
|
||||
zval **z_timezone_type = NULL;
|
||||
|
||||
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS) {
|
||||
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS && Z_TYPE_PP(z_timezone_type) == IS_LONG) {
|
||||
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
|
||||
convert_to_long(*z_timezone_type);
|
||||
if (SUCCESS == timezone_initialize(*tzobj, Z_STRVAL_PP(z_timezone) TSRMLS_CC)) {
|
||||
return SUCCESS;
|
||||
}
|
||||
@@ -3771,7 +3766,9 @@ PHP_METHOD(DateTimeZone, __set_state)
|
||||
|
||||
php_date_instantiate(date_ce_timezone, return_value TSRMLS_CC);
|
||||
tzobj = (php_timezone_obj *) zend_object_store_get_object(return_value TSRMLS_CC);
|
||||
php_date_timezone_initialize_from_hash(&return_value, &tzobj, myht TSRMLS_CC);
|
||||
if(php_date_timezone_initialize_from_hash(&return_value, &tzobj, myht TSRMLS_CC) != SUCCESS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Timezone initialization failed");
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -3787,7 +3784,9 @@ PHP_METHOD(DateTimeZone, __wakeup)
|
||||
|
||||
myht = Z_OBJPROP_P(object);
|
||||
|
||||
php_date_timezone_initialize_from_hash(&return_value, &tzobj, myht TSRMLS_CC);
|
||||
if(php_date_timezone_initialize_from_hash(&return_value, &tzobj, myht TSRMLS_CC) != SUCCESS) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Timezone initialization failed");
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
--TEST--
|
||||
Bug #55407 (Impossible to prototype DateTime::createFromFormat)
|
||||
--INI--
|
||||
error_reporting=-1
|
||||
--FILE--
|
||||
<?php namespace melt\core;
|
||||
|
||||
class DateTime extends \DateTime {
|
||||
public static function createFromFormat($format, $time, DateTimeZone $timezone = null) {
|
||||
return new DateTime(parent::createFromFormat($format, $time, $timezone));
|
||||
}
|
||||
}
|
||||
|
||||
echo "DONE\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
DONE
|
||||
@@ -0,0 +1,9 @@
|
||||
--TEST--
|
||||
Bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone).
|
||||
--FILE--
|
||||
<?php
|
||||
$data = unserialize('a:2:{i:0;O:12:"DateTimeZone":2:{s:13:"timezone_type";a:2:{i:0;i:1;i:1;i:2;}s:8:"timezone";s:1:"A";}i:1;R:4;}');
|
||||
var_dump($data);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: DateTimeZone::__wakeup(): Timezone initialization failed in %s/bug68942.php on line %d
|
||||
@@ -0,0 +1,9 @@
|
||||
--TEST--
|
||||
Bug #68942 (Use after free vulnerability in unserialize() with DateTime).
|
||||
--FILE--
|
||||
<?php
|
||||
$data = unserialize('a:2:{i:0;O:8:"DateTime":3:{s:4:"date";s:26:"2000-01-01 00:00:00.000000";s:13:"timezone_type";a:2:{i:0;i:1;i:1;i:2;}s:8:"timezone";s:1:"A";}i:1;R:5;}');
|
||||
var_dump($data);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Invalid serialization data for DateTime object in %s/bug68942_2.php on line %d
|
||||
@@ -550,13 +550,12 @@ PHP_FUNCTION(enchant_broker_request_dict)
|
||||
|
||||
d = enchant_broker_request_dict(pbroker->pbroker, (const char *)tag);
|
||||
if (d) {
|
||||
pos = pbroker->dictcnt++;
|
||||
if (pbroker->dictcnt) {
|
||||
pbroker->dict = (enchant_dict **)erealloc(pbroker->dict, sizeof(enchant_dict *) * pbroker->dictcnt);
|
||||
pos = pbroker->dictcnt++;
|
||||
} else {
|
||||
pbroker->dict = (enchant_dict **)emalloc(sizeof(enchant_dict *));
|
||||
pos = 0;
|
||||
pbroker->dictcnt++;
|
||||
}
|
||||
|
||||
dict = pbroker->dict[pos] = (enchant_dict *)emalloc(sizeof(enchant_dict));
|
||||
@@ -607,14 +606,14 @@ PHP_FUNCTION(enchant_broker_request_pwl_dict)
|
||||
|
||||
d = enchant_broker_request_pwl_dict(pbroker->pbroker, (const char *)pwl);
|
||||
if (d) {
|
||||
pos = pbroker->dictcnt++;
|
||||
if (pbroker->dictcnt) {
|
||||
pos = pbroker->dictcnt++;
|
||||
pbroker->dict = (enchant_dict **)erealloc(pbroker->dict, sizeof(enchant_dict *) * pbroker->dictcnt);
|
||||
} else {
|
||||
pbroker->dict = (enchant_dict **)emalloc(sizeof(enchant_dict *));
|
||||
pos = 0;
|
||||
pbroker->dictcnt++;
|
||||
}
|
||||
|
||||
dict = pbroker->dict[pos] = (enchant_dict *)emalloc(sizeof(enchant_dict));
|
||||
dict->id = pos;
|
||||
dict->pbroker = pbroker;
|
||||
|
||||
@@ -3404,6 +3404,9 @@ static void php_putenv_destructor(putenv_entry *pe) /* {{{ */
|
||||
unsetenv(pe->key);
|
||||
# elif defined(PHP_WIN32)
|
||||
SetEnvironmentVariable(pe->key, NULL);
|
||||
# ifndef ZTS
|
||||
_putenv_s(pe->key, "");
|
||||
# endif
|
||||
# else
|
||||
char **env;
|
||||
|
||||
|
||||
@@ -188,6 +188,10 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot execute a blank command");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (strlen(cmd) != cmd_len) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "NULL byte detected. Possible attack");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!ret_array) {
|
||||
ret = php_exec(mode, cmd, NULL, return_value TSRMLS_CC);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
--TEST--
|
||||
Bug #60227 (header() cannot detect the multi-line header with CR), \r before \n
|
||||
--INI--
|
||||
expose_php=0
|
||||
--FILE--
|
||||
<?php
|
||||
header("X-foo: e\n foo");
|
||||
header("X-Foo6: e\rSet-Cookie: ID=123\n d");
|
||||
echo 'foo';
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Warning: Header may not contain more than a single header, new line detected in %s on line %d
|
||||
foo
|
||||
--EXPECTHEADERS--
|
||||
X-foo: e
|
||||
foo
|
||||
Content-type: text/html; charset=UTF-8
|
||||
@@ -1,8 +1,9 @@
|
||||
--TEST--
|
||||
Bug #60227 (header() cannot detect the multi-line header with CR), \0 before \n
|
||||
--INI--
|
||||
expose_php=0
|
||||
--FILE--
|
||||
<?php
|
||||
header("X-foo: e\n foo");
|
||||
header("X-Foo6: e\0Set-Cookie: ID=\n123\n d");
|
||||
echo 'foo';
|
||||
?>
|
||||
@@ -10,5 +11,4 @@ echo 'foo';
|
||||
Warning: Header may not contain NUL bytes in %s on line %d
|
||||
foo
|
||||
--EXPECTHEADERS--
|
||||
X-foo: e
|
||||
foo
|
||||
Content-type: text/html; charset=UTF-8
|
||||
@@ -1,8 +1,9 @@
|
||||
--TEST--
|
||||
Bug #60227 (header() cannot detect the multi-line header with CR), CRLF
|
||||
--INI--
|
||||
expose_php=0
|
||||
--FILE--
|
||||
<?php
|
||||
header("X-foo: e\r\n foo");
|
||||
header("X-foo: e\r\nfoo");
|
||||
echo 'foo';
|
||||
?>
|
||||
@@ -10,5 +11,4 @@ echo 'foo';
|
||||
Warning: Header may not contain more than a single header, new line detected in %s on line %d
|
||||
foo
|
||||
--EXPECTHEADERS--
|
||||
X-foo: e
|
||||
foo
|
||||
Content-type: text/html; charset=UTF-8
|
||||
@@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
exec, system, passthru — Basic command execution functions
|
||||
--SKIPIF--
|
||||
<?php
|
||||
// If this does not work for Windows, please uncomment or fix test
|
||||
// if(substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$cmd = "echo abc\n\0command";
|
||||
var_dump(exec($cmd, $output));
|
||||
var_dump($output);
|
||||
var_dump(system($cmd));
|
||||
var_dump(passthru($cmd));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: exec(): NULL byte detected. Possible attack in %s on line %d
|
||||
bool(false)
|
||||
NULL
|
||||
|
||||
Warning: system(): NULL byte detected. Possible attack in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: passthru(): NULL byte detected. Possible attack in %s on line %d
|
||||
bool(false)
|
||||
+2
-7
@@ -747,13 +747,8 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
|
||||
/* new line/NUL character safety check */
|
||||
int i;
|
||||
for (i = 0; i < header_line_len; i++) {
|
||||
/* RFC 2616 allows new lines if followed by SP or HT */
|
||||
int illegal_break =
|
||||
(header_line[i+1] != ' ' && header_line[i+1] != '\t')
|
||||
&& (
|
||||
header_line[i] == '\n'
|
||||
|| (header_line[i] == '\r' && header_line[i+1] != '\n'));
|
||||
if (illegal_break) {
|
||||
/* RFC 7230 ch. 3.2.4 deprecates folding support */
|
||||
if (header_line[i] == '\n' || header_line[i] == '\r') {
|
||||
efree(header_line);
|
||||
sapi_module.sapi_error(E_WARNING, "Header may not contain "
|
||||
"more than a single header, new line detected");
|
||||
|
||||
+2
-2
@@ -3,6 +3,6 @@
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 6
|
||||
#define PHP_RELEASE_VERSION 6
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "5.6.6-dev"
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "5.6.6"
|
||||
#define PHP_VERSION_ID 50606
|
||||
Reference in new issue
Block a user