Compare commits

...
Author SHA1 Message Date
Remi Collet 00d2b7a3d2 Update versions for PHP 7.2.10 2018-09-11 06:50:37 +00:00
Remi Collet 588b9d28bd Update NEWS for PHP 7.2.10 2018-09-11 06:50:37 +00:00
Remi Collet 4be8fdc548 add NEWS for 76582 2018-09-10 15:30:09 +02:00
Stanislav Malyshev 3b07b3c203 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fix for bug #76582
2018-09-10 15:26:39 +02:00
Remi Collet b15f24b045 Update NEWS for PHP 7.2.10RC1 2018-08-28 07:28:04 +00:00
Christoph M. Becker 20849b0b0f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #68180: iconv_mime_decode can return extra characters in a header
2018-08-26 13:21:22 +02:00
Christoph M. Becker efb86aef12 Fix #68180: iconv_mime_decode can return extra characters in a header
Basically, the algorithm to append a converted string to an existing
`smart_str` works by increasing the `smart_str` buffer, to let `iconv`
convert characters until there is no more space, to set the new length
of the `smart_str` and to repeat until there is no more input.

Formerly, the new length calculation has been wrong, though, since we
would have to take the old `out_len` into account (`buf_growth -
old_out_len - out_len`).  However, since there is no need to take the
old `out_len` into account when increasing the `smart_str` buffer, we
can simplify the fix, avoiding an additional variable.
2018-08-26 13:18:35 +02:00
Christoph M. Becker 314b8ecf8b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #60494: iconv_mime_decode does ignore special characters
2018-08-25 17:47:29 +02:00
Christoph M. Becker e29c946c29 Fix #60494: iconv_mime_decode does ignore special characters
We must not ignore erroneous characters in mime headers, but rather let
iconv_mime_decode() fail in this case, issuing the usual notice
regarding illegal characters.
2018-08-25 17:40:39 +02:00
Christoph M. Becker 7e176ddb57 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #63839: iconv_mime_decode_headers function is skipping headers
2018-08-25 14:52:54 +02:00
Christoph M. Becker 8754d44167 Fix #63839: iconv_mime_decode_headers function is skipping headers
We have to cater to the possibility that `=?` is not the start of an
encoded-word, but rather a literal `=?`.  If a line break is found
while we're still looking for the charset, we can safely assume that
it's a literal `=?`, and act accordingly.
2018-08-25 14:51:13 +02:00
Christoph M. Becker 6922cae4ae Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #55146: iconv_mime_decode_headers() skips some headers
2018-08-25 14:41:38 +02:00
Christoph M. Becker 6e1980e152 Fix #55146: iconv_mime_decode_headers() skips some headers
If we're expecting the start of an encoded word (`=?`), but instead of
the question mark get a line break (CR or LF), we must not append it to
the `pretval`.
2018-08-25 14:40:07 +02:00
Anatol Belski 8f43ec1e83 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  mkdist.php: recursively check dll dependencies
2018-08-23 21:26:40 +02:00
Dylan K. Taylor b9bf9ddce6 mkdist.php: recursively check dll dependencies
Fix duplication of recursively checked deps
2018-08-23 21:25:54 +02:00
Christoph M. Becker 1c3d5659bd Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Simplify regression test
2018-08-23 12:49:26 +02:00
Christoph M. Becker 6644bd005f Simplify regression test
There's no need to actually try to trigger an out-of-memory condition
to proof the leak; instead we can simply rely on the Zend MM to report
the memory leaks in debug mode (at least on Linux).  Therefore we
simplify the regression test, which also makes it run much faster.
2018-08-23 12:48:09 +02:00
Christoph M. Becker 36946f5c45 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #68825: Exception in DirectoryIterator::getLinkTarget()
2018-08-22 15:38:30 +02:00
Christoph M. Becker 32a728d351 Fix #68825: Exception in DirectoryIterator::getLinkTarget()
intern->file_name may not have been properly set when
DirectoryIterator::getLinkTarget() is called, so we make sure it is
before using it.
2018-08-22 15:37:02 +02:00
Christoph M. Becker 10661e28d1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Increase memory_limit to prevent test failures
2018-08-22 14:30:23 +02:00
Christoph M. Becker 5fb01a3a42 Increase memory_limit to prevent test failures 2018-08-22 14:29:28 +02:00
Christoph M. Becker cdd9eb8c4a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76778: array_reduce leaks memory if callback throws exception
2018-08-22 13:49:35 +02:00
Christoph M. Becker 70b2fca220 Fix #76778: array_reduce leaks memory if callback throws exception
We have to release the result variable in the error case, too.
2018-08-22 13:40:24 +02:00
Massimiliano Braglia 2527a0fcfd Fixed bug #75797
Fix zend_register_class_alias_ex() to use non-persistent strings
for (non-persistent) userland classes.
2018-08-22 13:39:08 +02:00
Christoph M. Becker 7ad0595712 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76777 and added test
2018-08-22 12:52:41 +02:00
Ville Hukkamaki cf2fc66b02 Fixed bug #76777 and added test
Set undefined values to null rather than undefined.
2018-08-22 12:51:06 +02:00
Jakub Zelenka 73a8f72617 Merge branch 'PHP-7.1' into PHP-7.2 2018-08-19 20:19:01 +01:00
Jakub Zelenka 4c542e6c13 Fix bug #76705 (unusable ssl => peer_fingerprint in stream_context_create()) 2018-08-19 20:14:26 +01:00
Anatol Belski b0da1745be Use stable deps on AppVeyor for now
as long as the latest image is not synced with VC++ 15.8
2018-08-18 20:04:19 +02:00
Christoph M. Becker 41d2102c77 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add regression test for bug #68175
  Fix #68175: RegexIterator pregFlags are NULL instead of 0
2018-08-18 14:37:48 +02:00
Christoph M. Becker 4c448334bd Add regression test for bug #68175 2018-08-18 14:36:16 +02:00
Tim Siebels 3257d22fea Fix #68175: RegexIterator pregFlags are NULL instead of 0 2018-08-18 14:33:39 +02:00
Anatol Belski 4aa5065bb0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update binary SDK version for AppVeyor
2018-08-17 15:45:31 +02:00
Anatol Belski 837ed71c65 Update binary SDK version for AppVeyor 2018-08-17 15:44:10 +02:00
Xinchen Hui acd4264f7b Update NEWS 2018-08-17 13:35:46 +08:00
Xinchen Hui ca103b415e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76754 (parent private constant in extends class memory leak)
2018-08-17 13:35:31 +08:00
Xinchen Hui 04c4854fdf Fixed bug #76754 (parent private constant in extends class memory leak) 2018-08-17 13:35:15 +08:00
Xinchen Hui a158fb958f Merge branch 'PHP-7.2' of git.php.net:/php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:/php-src:
  fix man page installation
2018-08-16 14:01:17 +08:00
Xinchen Hui 64c88c1e16 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  fix man page installation
2018-08-16 14:00:30 +08:00
Xinchen Hui eb7fca9546 Update NEWS 2018-08-16 13:56:52 +08:00
Xinchen Hui a879f4dd22 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76747 (Opcache treats path containing "test.pharma.tld" as a phar file)
2018-08-16 13:56:37 +08:00
Xinchen Hui 8c92442b49 Fixed bug #76747 (Opcache treats path containing "test.pharma.tld" as a phar file) 2018-08-16 13:56:20 +08:00
Remi Collet 2cdde35d0f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix man page installation
2018-08-16 06:54:57 +02:00
Remi Collet 1f2f2c6b96 fix man page installation
Since 91996e7ee5
phpdbg.1 is in buildir, not in srcdir
2018-08-16 06:53:56 +02:00
28 changed files with 465 additions and 34 deletions

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ environment:
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
PHP_BUILD_OBJ_DIR: c:\obj
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.7
PHP_BUILD_SDK_BRANCH: php-sdk-2.1.8
PHP_BUILD_CRT: vc15
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
+37 -1
View File
@@ -1,9 +1,16 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2018, PHP 7.2.10
13 Sep 2018, PHP 7.2.10
- Core:
. Fixed bug #76754 (parent private constant in extends class memory leak).
(Laruence)
. Fixed bug #72443 (Generate enabled extension). (petk)
. Fixed bug #75797 (Memory leak when using class_alias() in non-debug mode).
(Massimiliano Braglia)
- Apache2:
. Fixed bug #76582 (Apache bucket brigade sometimes becomes invalid). (stas)
- Bz2:
. Fixed arginfo for bzcompress. (Tyson Andre)
@@ -11,18 +18,47 @@ PHP NEWS
- gettext:
. Fixed bug #76517 (incorrect restoring of LDFLAGS). (sji)
- iconv:
. Fixed bug #68180 (iconv_mime_decode can return extra characters in a
header). (cmb)
. Fixed bug #63839 (iconv_mime_decode_headers function is skipping headers).
(cmb)
. Fixed bug #60494 (iconv_mime_decode does ignore special characters). (cmb)
. Fixed bug #55146 (iconv_mime_decode_headers() skips some headers). (cmb)
- intl:
. Fixed bug #74484 (MessageFormatter::formatMessage memory corruption with
11+ named placeholders). (Anatol)
- libxml:
. Fixed bug #76777 ("public id" parameter of libxml_set_external_entity_loader
callback undefined). (Ville Hukkamäki)
- mbstring:
. Fixed bug #76704 (mb_detect_order return value varies based on argument
type). (cmb)
- Opcache:
. Fixed bug #76747 (Opcache treats path containing "test.pharma.tld" as a phar
file). (Laruence)
- OpenSSL:
. Fixed bug #76705 (unusable ssl => peer_fingerprint in
stream_context_create()). (Jakub Zelenka)
- phpdbg:
. Fixed bug #76595 (phpdbg man page contains outdated information).
(Kevin Abel)
- SPL:
. Fixed bug #68825 (Exception in DirectoryIterator::getLinkTarget()). (cmb)
. Fixed bug #68175 (RegexIterator pregFlags are NULL instead of 0). (Tim
Siebels)
- Standard:
. Fixed bug #76778 (array_reduce leaks memory if callback throws exception).
(cmb)
- zlib:
. Fixed bug #65988 (Zlib version check fails when an include/zlib/ style dir
is passed to the --with-zlib configure option). (Jay Bonci)
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #76754 (parent private constant in extends class memory leak)
--INI--
opcache.enable=0
opcache.enable_cli=0
--FILE--
<?php
class FOO
{
private const FOO = 'BAR';
}
class BAR extends FOO { }
?>
okey
--EXPECT--
okey
+5 -2
View File
@@ -2774,12 +2774,15 @@ ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry *or
ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce) /* {{{ */
{
zend_string *lcname;
int persistent;
persistent = ce->type != ZEND_USER_CLASS;
if (name[0] == '\\') {
lcname = zend_string_alloc(name_len-1, 1);
lcname = zend_string_alloc(name_len-1, persistent);
zend_str_tolower_copy(ZSTR_VAL(lcname), name+1, name_len-1);
} else {
lcname = zend_string_alloc(name_len, 1);
lcname = zend_string_alloc(name_len, persistent);
zend_str_tolower_copy(ZSTR_VAL(lcname), name, name_len);
}
+1 -1
View File
@@ -297,8 +297,8 @@ ZEND_API void destroy_zend_class(zval *zv)
}
}
} ZEND_HASH_FOREACH_END();
zend_hash_destroy(&ce->constants_table);
}
zend_hash_destroy(&ce->constants_table);
if (ce->num_interfaces > 0 && ce->interfaces) {
efree(ce->interfaces);
}
+1 -1
View File
@@ -19,7 +19,7 @@ if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
) else (
set BRANCH=master
)
set STABILITY=staging
set STABILITY=stable
set DEPS_DIR=%PHP_BUILD_CACHE_BASE_DIR%\deps-%BRANCH%-%PHP_SDK_VC%-%PHP_SDK_ARCH%
rem SDK is cached, deps info is cached as well
echo Updating dependencies in %DEPS_DIR%
+2 -2
View File
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=9
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=10
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`
+26 -3
View File
@@ -462,7 +462,7 @@ static php_iconv_err_t _php_iconv_appendl(smart_str *d, const char *s, size_t l,
if (in_p != NULL) {
while (in_left > 0) {
out_left = buf_growth - out_left;
out_left = buf_growth;
smart_str_alloc(d, out_left, 0);
out_p = ZSTR_VAL((d)->s) + ZSTR_LEN((d)->s);
@@ -496,7 +496,7 @@ static php_iconv_err_t _php_iconv_appendl(smart_str *d, const char *s, size_t l,
}
} else {
for (;;) {
out_left = buf_growth - out_left;
out_left = buf_growth;
smart_str_alloc(d, out_left, 0);
out_p = ZSTR_VAL((d)->s) + ZSTR_LEN((d)->s);
@@ -1535,7 +1535,10 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
break;
default: /* first letter of a non-encoded word */
_php_iconv_appendc(pretval, *p1, cd_pl);
err = _php_iconv_appendc(pretval, *p1, cd_pl);
if (err != PHP_ICONV_ERR_SUCCESS) {
goto out;
}
encoded_word = NULL;
if ((mode & PHP_ICONV_MIME_DECODE_STRICT)) {
scan_stat = 12;
@@ -1546,6 +1549,9 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
case 1: /* expecting a delimiter */
if (*p1 != '?') {
if (*p1 == '\r' || *p1 == '\n') {
--p1;
}
err = _php_iconv_appendl(pretval, encoded_word, (size_t)((p1 + 1) - encoded_word), cd_pl);
if (err != PHP_ICONV_ERR_SUCCESS) {
goto out;
@@ -1571,6 +1577,23 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
case '*': /* new style delimiter: locale id follows */
scan_stat = 10;
break;
case '\r': case '\n': /* not an encoded-word */
--p1;
_php_iconv_appendc(pretval, '=', cd_pl);
_php_iconv_appendc(pretval, '?', cd_pl);
err = _php_iconv_appendl(pretval, csname, (size_t)((p1 + 1) - csname), cd_pl);
if (err != PHP_ICONV_ERR_SUCCESS) {
goto out;
}
csname = NULL;
if ((mode & PHP_ICONV_MIME_DECODE_STRICT)) {
scan_stat = 12;
}
else {
scan_stat = 0;
}
continue;
}
if (scan_stat != 2) {
char tmpbuf[80];
+36
View File
@@ -0,0 +1,36 @@
--TEST--
Bug #55146 (iconv_mime_decode_headers() skips some headers)
--SKIPIF--
<?php
if (!extension_loaded('iconv')) die('skip iconv extension not available');
?>
--FILE--
<?php
$headers = <<< HEADERS
X-Header-One: H4sIAAAAAAAAA+NgFlsCAAA=
X-Header-Two: XtLePq6GTMn8G68F0
HEADERS;
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR));
$headers = <<< HEADERS
X-Header-One: =
X-Header-Two: XtLePq6GTMn8G68F0
HEADERS;
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_STRICT));
?>
===DONE===
--EXPECT--
array(2) {
["X-Header-One"]=>
string(24) "H4sIAAAAAAAAA+NgFlsCAAA="
["X-Header-Two"]=>
string(17) "XtLePq6GTMn8G68F0"
}
array(2) {
["X-Header-One"]=>
string(1) "="
["X-Header-Two"]=>
string(17) "XtLePq6GTMn8G68F0"
}
===DONE===
+23
View File
@@ -0,0 +1,23 @@
--TEST--
Bug #60494 (iconv_mime_decode does ignore special characters)
--SKIPIF--
<?php
if (!extension_loaded('iconv')) die('skip iconv extension not available');
?>
--FILE--
<?php
var_dump(iconv_mime_decode('ä'));
var_dump(iconv_mime_decode('ö'));
var_dump(iconv_mime_decode('ß'));
?>
===DONE===
--EXPECTF--
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
bool(false)
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
bool(false)
Notice: iconv_mime_decode(): Detected an illegal character in input string in %s on line %d
bool(false)
===DONE===
+71
View File
@@ -0,0 +1,71 @@
--TEST--
Bug #63839 (iconv_mime_decode_headers function is skipping headers)
--SKIPIF--
<?php
if (!extension_loaded('iconv')) die('skip iconv extension not available');
?>
--FILE--
<?php
$headers = 'From: "xyz" <xyz@xyz.com>
To: <xyz@xyz.com>
Subject: Reply Is? white side-LED =? in Help
Date: Sat, 22 Dec 2012
Message-ID: <006f01cde00e$d9f79da0$8de6d8e0>
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0"
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac3gDtcH2huHjzYcQVmFJPPoWjJogA==
Content-Language: en-us
';
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR));
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_STRICT));
?>
===DONE===
--EXPECT--
array(10) {
["From"]=>
string(19) ""xyz" <xyz@xyz.com>"
["To"]=>
string(13) "<xyz@xyz.com>"
["Subject"]=>
string(35) "Reply Is? white side-LED =? in Help"
["Date"]=>
string(16) "Sat, 22 Dec 2012"
["Message-ID"]=>
string(32) "<006f01cde00e$d9f79da0$8de6d8e0>"
["MIME-Version"]=>
string(3) "1.0"
["Content-Type"]=>
string(75) "multipart/alternative; boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0""
["X-Mailer"]=>
string(29) "Microsoft Office Outlook 12.0"
["Thread-Index"]=>
string(32) "Ac3gDtcH2huHjzYcQVmFJPPoWjJogA=="
["Content-Language"]=>
string(5) "en-us"
}
array(10) {
["From"]=>
string(19) ""xyz" <xyz@xyz.com>"
["To"]=>
string(13) "<xyz@xyz.com>"
["Subject"]=>
string(35) "Reply Is? white side-LED =? in Help"
["Date"]=>
string(16) "Sat, 22 Dec 2012"
["Message-ID"]=>
string(32) "<006f01cde00e$d9f79da0$8de6d8e0>"
["MIME-Version"]=>
string(3) "1.0"
["Content-Type"]=>
string(75) "multipart/alternative; boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0""
["X-Mailer"]=>
string(29) "Microsoft Office Outlook 12.0"
["Thread-Index"]=>
string(32) "Ac3gDtcH2huHjzYcQVmFJPPoWjJogA=="
["Content-Language"]=>
string(5) "en-us"
}
===DONE===
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #68180 (iconv_mime_decode can return extra characters in a header)
--SKIPIF--
<?php
if (!extension_loaded('iconv')) die('skip iconv extension not available');
?>
--FILE--
<?php
$original = "=?UTF-8?Q?=E3=80=8E=E3=80=90=E5=A4=96=E8=B3=87=E7=B3=BB=E6=88=A6=E7=95=A5=E3=82=B3=E3=83=B3=E3=82=B5=E3=83=AB=E3=81=8C=E9=9B=86=E7=B5=90=E3=80=91=E3=83=88=E3=83=83=E3=83=97=E3=82=B3=E3=83=B3=E3=82=B5=E3=83=AB=E3=82=BF=E3=83=B3=E3=83=88=E3=81=A8=E8=A9=B1=E3=81=9B=E3=82=8B=E3=82=B3=E3=83=B3=E3=82=B5=E3=83=AB=E6=A5=AD=E7=95=8C=E7=A0=94=E7=A9=B6=E3=82=BB=E3=83=9F=E3=83=8A=E3=83=BC=E3=80=8F=E3=81=B8=E3=81=AE=E3=82=A8=E3=83=B3=E3=83=88=E3=83=AA=E3=83=BC=E3=81=82=E3=82=8A=E3=81=8C=E3=81=A8=E3=81=86=E3=81=94=E3=81=96=E3=81=84=E3=81=BE=E3=81=97=E3=81=9F=E3=80=82?=";
$decoded = iconv_mime_decode($original, ICONV_MIME_DECODE_STRICT, 'utf-8');
var_dump($decoded);
?>
===DONE===
--EXPECT--
string(183) "『【外資系戦略コンサルが集結】トップコンサルタントと話せるコンサル業界研究セミナー』へのエントリーありがとうございました。"
===DONE===
+2 -2
View File
@@ -591,12 +591,12 @@ static xmlParserInputPtr _php_libxml_external_entity_loader(const char *URL,
if (ID != NULL) {
ZVAL_STRING(&params[0], ID);
} else {
ZVAL_UNDEF(&params[0]);
ZVAL_NULL(&params[0]);
}
if (URL != NULL) {
ZVAL_STRING(&params[1], URL);
} else {
ZVAL_UNDEF(&params[1]);
ZVAL_NULL(&params[1]);
}
ctxzv = &params[2];
array_init_size(ctxzv, 4);
+43
View File
@@ -0,0 +1,43 @@
--TEST--
Bug #76777 (first parameter of libxml_set_external_entity_loader callback undefined)
--SKIPIF--
<?php
if (!extension_loaded('libxml')) die('skip');
if (getenv("SKIP_ONLINE_TESTS")) die('skip online test');
?>
--FILE--
<?php
$xml=<<<EOF
<?xml version="1.0"?>
<test/>
EOF;
$xsd=<<<EOF
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="nonexistent.xsd"/>
<xs:element name="test"/>
</xs:schema>
EOF;
libxml_set_external_entity_loader(function($p,$s,$c) {
var_dump($p,$s,$c);
die();
});
$dom=new DOMDocument($xml);
$dom->schemaValidateSource($xsd);
?>
--EXPECTF--
NULL
string(15) "nonexistent.xsd"
array(4) {
["directory"]=>
NULL
["intSubName"]=>
NULL
["extSubURI"]=>
NULL
["extSubSystem"]=>
NULL
}
+9 -8
View File
@@ -1253,6 +1253,13 @@ static void zend_accel_add_key(char *key, unsigned int key_length, zend_accel_ha
}
}
static zend_always_inline zend_bool is_phar_file(zend_string *filename)
{
return filename && ZSTR_LEN(filename) >= sizeof(".phar") &&
!memcmp(ZSTR_VAL(filename) + ZSTR_LEN(filename) - (sizeof(".phar")-1), ".phar", sizeof(".phar")-1) &&
!strstr(ZSTR_VAL(filename), "://");
}
#ifdef HAVE_OPCACHE_FILE_CACHE
static zend_persistent_script *store_script_in_file_cache(zend_persistent_script *new_persistent_script)
{
@@ -1277,10 +1284,7 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script
zend_shared_alloc_destroy_xlat_table();
new_persistent_script->is_phar =
new_persistent_script->script.filename &&
strstr(ZSTR_VAL(new_persistent_script->script.filename), ".phar") &&
!strstr(ZSTR_VAL(new_persistent_script->script.filename), "://");
new_persistent_script->is_phar = is_phar_file(new_persistent_script->script.filename);
/* Consistency check */
if ((char*)new_persistent_script->mem + new_persistent_script->size != (char*)ZCG(mem)) {
@@ -1402,10 +1406,7 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr
zend_shared_alloc_destroy_xlat_table();
new_persistent_script->is_phar =
new_persistent_script->script.filename &&
strstr(ZSTR_VAL(new_persistent_script->script.filename), ".phar") &&
!strstr(ZSTR_VAL(new_persistent_script->script.filename), "://");
new_persistent_script->is_phar = is_phar_file(new_persistent_script->script.filename);
/* Consistency check */
if ((char*)new_persistent_script->mem + new_persistent_script->size != (char*)ZCG(mem)) {
+50
View File
@@ -0,0 +1,50 @@
-----BEGIN CERTIFICATE-----
MIIDjjCCAnagAwIBAgIJAJCtQJeo8gdyMA0GCSqGSIb3DQEBCwUAMFwxCzAJBgNV
BAYTAkdCMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQxGDAWBgNVBAMMD29wZW5zc2wucGhwLm5ldDAeFw0xODA4MTkx
ODQxMzdaFw0yODA4MTYxODQxMzdaMFwxCzAJBgNVBAYTAkdCMRUwEwYDVQQHDAxE
ZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxGDAWBgNV
BAMMD29wZW5zc2wucGhwLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBALqnJTvXG3o47uPpaJI+rjCfwWAvX8lqUPD05jYCEckYOCQZDze0qAzxJRnl
dJS4V/sEWgqtroJm+AuasEd7GFhuTWG72eo4Gq8kJHt2+ev68yIfxtOvV4gDcN3w
9Mkk66q661Jg2oMnWK518VpiQQaNRKQtVkjrLf0DG+WRjx1Y6BFpx8mw699lepfk
IYhblg1JulmIQ99FnE3xkuJ9gsh74BrBD4CxwBAHk3WFB6nnrMW++4rG1gexOCdB
fikGALEZDjH5iPjNT1c7Los3CVDldHLTDHHUKEM3w/hp5d2lw67eUpoGrxwbnXF5
nngdFHe2QJNd5jN2TFICJkcIZb8CAwEAAaNTMFEwHQYDVR0OBBYEFAfXyCoG/LwU
8eoV8bdp1859DnjCMB8GA1UdIwQYMBaAFAfXyCoG/LwU8eoV8bdp1859DnjCMA8G
A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBADLZHI4YYvgmKVmtzvow
kqhljnR14WVeVgr/zfGbRwgeiyokG+BAb0yaNAWO5QYJH8rrx2+1pTq4alAvkoQm
2mjJu5d4Dfyb7Cmiz8EeITbfZUmX/JZJIOTrXUx5NiIndB6zJf3Bzq2oqeeENW7E
zKLmBpiOhywoVdzhGTGOxJo7nlXhzkQleQ+N1NgDjIyFSSkKyuXpdUjhD8Pm+/x9
0oJIU1pcCVFmavjwFmAEPTD+xNiXZDhndWElEmb6q5yJzbPbxQmCwYpNOknQXKRA
+ERVRVyaMmO286CONAhSO2cP9P/Ss7NSt28kXNGux1zSeXsRjMx8ICUqtaG99ZhD
bdo=
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC6pyU71xt6OO7j
6WiSPq4wn8FgL1/JalDw9OY2AhHJGDgkGQ83tKgM8SUZ5XSUuFf7BFoKra6CZvgL
mrBHexhYbk1hu9nqOBqvJCR7dvnr+vMiH8bTr1eIA3Dd8PTJJOuquutSYNqDJ1iu
dfFaYkEGjUSkLVZI6y39AxvlkY8dWOgRacfJsOvfZXqX5CGIW5YNSbpZiEPfRZxN
8ZLifYLIe+AawQ+AscAQB5N1hQep56zFvvuKxtYHsTgnQX4pBgCxGQ4x+Yj4zU9X
Oy6LNwlQ5XRy0wxx1ChDN8P4aeXdpcOu3lKaBq8cG51xeZ54HRR3tkCTXeYzdkxS
AiZHCGW/AgMBAAECggEBAKTTTyT9uoz+0649gpOKeGYF3Uzj6NFDakCt8tEEmNIc
6g6udmq5xKDRHfM1VfKyqzbGTAEcCHutFCOjMUGeKQyGMx04NqIHc0DwSKsikGZb
z/J1Xy21rDU23KeQzYkGann04DN5xdyFlWFSU5R+KW/wtgnI42Y3EABai3r5RAkj
4s5GzXhKygdcyDbhv+bcllQi3iAIZExjo6rMN+lmkdP90w/Bjvp4hagCqxEoAh7c
60PVHfSa5oxd4l9/ni0tddtmkaiwEyxVRDDdduGquOtS3tbThCOzoOeXvbhWCjc2
QmYAymKAe6G2LxmCUTUz6iPxTQPBAT1q2DFuUpBoOwECgYEA8IFZyooC8lO3WJSX
sPSOKRryO/TKrtWJY2Mh8gZpVlK8OrLZzpv+odPtIpKMvljlNRd0HTonnVrfB7jy
6MQN8r6Go+Q9Xy0fYUEoPapdzPvfiYx93KqYIFpg2BrZZFOLN3Ptp7kOhej1KJNe
DCiN2nk1l+Kp1I22ONYLSwR90D8CgYEAxq2bzaNvzkiIWpKucD9P1DJAVw91QJ3t
Ll/IF4+d6TPxKq7HKq/3FZSBTL49y7QXScryMR6H92syY0Jnax2erq8iVTc+KBqi
9j85A9LQi50qo/0AY4Fly3GrDENAohvCBt66OLrINbem5J+tY2pJHOWqzljaXzKx
+u7F/YaACoECgYEAgcUpz/F7+YlWasNyvhaXBnL1tYg2PPQXd7sru83d1Kg7zGho
weTGFkelsnvk2WhZ9LW8/3A7o9o+cYpH93SiGhLXz2L+Anb0caOYtP1SM6LMUQmv
d/vMrdhWXQTPvCSf/8HbwB5ISdUTQ1uQ6XqQYAv68QNqo7f7VNuZqFa6FD0CgYEA
tV/GLYv3xNUYjb78uoJB6VDaxd/Zxdymq0BLlZ7JpRyDHNkj/4dWxP+mrp26Il3N
KNO6GDdsHuZgwJbdfL80nvpJGIxvFQOEI9OBxEjPk7UuOTj+AtkdSgYCBhbbSWKX
1de9H478uXVoSaywCGL+TgAo12nsKR5JtvAGFbWU7IECgYADfyGWKiRpHUmxn/OH
9vkiISASRrh3YqdDtqij16pYc+VRC9/jUvGRtYAb7x0j6kO9zh3wkZlUXoPIH+zn
uBmiIY401DNbWe9rM7IeZOg88+WCLmZ6onMew752O7VUm6VotPOuUvYA5pQRZkma
aDvX/slF+5i+zgN6JKaqqppzQA==
-----END PRIVATE KEY-----
+43
View File
@@ -0,0 +1,43 @@
--TEST--
Bug #76705: unusable ssl => peer_fingerprint in stream_context_create()
--SKIPIF--
<?php
if (!extension_loaded("openssl")) die("skip openssl not loaded");
if (!function_exists("proc_open")) die("skip no proc_open");
?>
--FILE--
<?php
$serverCode = <<<'CODE'
$serverUri = "ssl://127.0.0.1:64323";
$serverFlags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
$serverCtx = stream_context_create(['ssl' => [
'local_cert' => __DIR__ . '/bug76705.pem'
]]);
$server = stream_socket_server($serverUri, $errno, $errstr, $serverFlags, $serverCtx);
phpt_notify();
@stream_socket_accept($server, 1);
CODE;
$clientCode = <<<'CODE'
$serverUri = "ssl://127.0.0.1:64323";
$clientFlags = STREAM_CLIENT_CONNECT;
$clientCtx = stream_context_create(['ssl' => [
'verify_peer' => true,
'peer_name' => 'openssl.php.net',
'allow_self_signed' => true,
'peer_fingerprint' => [
'sha256' => '4A524F3617E41BCCA1370ED9E89C9A7A83C28F0F342C490296D362869BDF1DA8',
]
]]);
phpt_wait();
var_dump(stream_socket_client($serverUri, $errno, $errstr, 2, $clientFlags, $clientCtx));
CODE;
include 'ServerClientTestCase.inc';
ServerClientTestCase::getInstance()->run($clientCode, $serverCode);
?>
--EXPECTF--
resource(%d) of type (stream)
+4 -2
View File
@@ -481,6 +481,7 @@ static zend_bool php_openssl_matches_common_name(X509 *peer, const char *subject
static int php_openssl_apply_peer_verification_policy(SSL *ssl, X509 *peer, php_stream *stream) /* {{{ */
{
zval *val = NULL;
zval *peer_fingerprint;
char *peer_name = NULL;
int err,
must_verify_peer,
@@ -498,6 +499,7 @@ static int php_openssl_apply_peer_verification_policy(SSL *ssl, X509 *peer, php_
: sslsock->is_client;
must_verify_fingerprint = GET_VER_OPT("peer_fingerprint");
peer_fingerprint = val;
if ((must_verify_peer || must_verify_peer_name || must_verify_fingerprint) && peer == NULL) {
php_error_docref(NULL, E_WARNING, "Could not get peer certificate");
@@ -529,8 +531,8 @@ static int php_openssl_apply_peer_verification_policy(SSL *ssl, X509 *peer, php_
/* If a peer_fingerprint match is required this trumps peer and peer_name verification */
if (must_verify_fingerprint) {
if (Z_TYPE_P(val) == IS_STRING || Z_TYPE_P(val) == IS_ARRAY) {
if (!php_openssl_x509_fingerprint_match(peer, val)) {
if (Z_TYPE_P(peer_fingerprint) == IS_STRING || Z_TYPE_P(peer_fingerprint) == IS_ARRAY) {
if (!php_openssl_x509_fingerprint_match(peer, peer_fingerprint)) {
php_error_docref(NULL, E_WARNING,
"peer_fingerprint match failure"
);
+3
View File
@@ -1245,6 +1245,9 @@ SPL_METHOD(SplFileInfo, getLinkTarget)
zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling);
if (intern->file_name == NULL) {
spl_filesystem_object_get_file_name(intern);
}
#if defined(PHP_WIN32) || HAVE_SYMLINK
if (intern->file_name == NULL) {
php_error_docref(NULL, E_WARNING, "Empty filename");
+1 -1
View File
@@ -2208,7 +2208,7 @@ SPL_METHOD(RegexIterator, getPregFlags)
if (intern->u.regex.use_flags) {
RETURN_LONG(intern->u.regex.preg_flags);
} else {
return;
RETURN_LONG(0);
}
} /* }}} */
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #68175 (RegexIterator pregFlags are NULL instead of 0)
--FILE--
<?php
$arr = new ArrayIterator(array());
$regex = new RegexIterator($arr, '/^test/');
var_dump(
$regex->getMode(),
$regex->getFlags(),
$regex->getPregFlags()
);
?>
===DONE===
--EXPECT--
int(0)
int(0)
int(0)
===DONE===
+25
View File
@@ -0,0 +1,25 @@
--TEST--
Bug #68825 (Exception in DirectoryIterator::getLinkTarget())
--FILE--
<?php
$dir = __DIR__ . '/bug68825';
mkdir($dir);
symlink(__FILE__, "$dir/foo");
$di = new \DirectoryIterator($dir);
foreach ($di as $entry) {
if ('foo' === $entry->getFilename()) {
var_dump($entry->getLinkTarget());
}
}
?>
===DONE===
--EXPECTF--
string(%d) "%s%eext%espl%etests%ebug68825.php"
===DONE===
--CLEAN--
<?php
$dir = __DIR__ . '/bug68825';
unlink("$dir/foo");
rmdir($dir);
?>
+1
View File
@@ -5977,6 +5977,7 @@ PHP_FUNCTION(array_reduce)
} else {
zval_ptr_dtor(&args[1]);
zval_ptr_dtor(&args[0]);
zval_ptr_dtor(&result);
return;
}
} ZEND_HASH_FOREACH_END();
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #76778 (array_reduce leaks memory if callback throws exception)
--FILE--
<?php
try {
array_reduce(
[1],
function ($carry, $item) {
throw new Exception;
},
range(1, 3)
);
} catch (Exception $e) {
}
?>
===DONE===
--EXPECT--
===DONE===
+4 -4
View File
@@ -2,7 +2,7 @@
/* edit configure.ac to change version number */
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 2
#define PHP_RELEASE_VERSION 9
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "7.2.9-dev"
#define PHP_VERSION_ID 70209
#define PHP_RELEASE_VERSION 10
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.2.10"
#define PHP_VERSION_ID 70210
+1
View File
@@ -712,6 +712,7 @@ zend_first_try {
if (!parent_req) {
php_apache_request_dtor(r);
ctx->request_processed = 1;
apr_brigade_cleanup(brigade);
bucket = apr_bucket_eos_create(r->connection->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(brigade, bucket);
+1 -1
View File
@@ -28,7 +28,7 @@ install-phpdbg: $(BUILD_BINARY)
@$(INSTALL) -m 0755 $(BUILD_BINARY) $(INSTALL_ROOT)$(bindir)/$(program_prefix)phpdbg$(program_suffix)$(EXEEXT)
@echo "Installing phpdbg man page: $(INSTALL_ROOT)$(mandir)/man1/"
@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
@$(INSTALL_DATA) $(srcdir)/phpdbg.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phpdbg$(program_suffix).1
@$(INSTALL_DATA) sapi/phpdbg/phpdbg.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phpdbg$(program_suffix).1
clean-phpdbg:
@echo "Cleaning phpdbg object files ..."
+5 -5
View File
@@ -123,7 +123,11 @@ function get_depends($module)
}
}
$per_module_deps[basename($module)][] = $dep;
if (!isset($per_module_deps[basename($module)]) || !in_array($dep, $per_module_deps[basename($module)])) {
$per_module_deps[basename($module)][] = $dep;
//recursively check dll dependencies
get_depends($dep);
}
}
fclose($pipes[1]);
proc_close($proc);
@@ -335,10 +339,6 @@ Add ADD_DLLS to add extra DLLs like dynamic dependencies for standard
deps. For example, libenchant.dll loads libenchant_myspell.dll or
libenchant_ispell.dll
*/
$ICU_DLLS = $php_build_dir . '/bin/icu*.dll';
foreach (glob($ICU_DLLS) as $filename) {
copy($filename, "$dist_dir/" . basename($filename));
}
$ENCHANT_DLLS = array(
array('', 'glib-2.dll'),
array('', 'gmodule-2.dll'),