Commit Graph

42105 Commits

Author SHA1 Message Date
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
Jakub Zelenka
c0203c0ceb Do not add already added object to the internal OpenSSL table
This fixes OpenSSL 1.1 where adding object with OID that has been
already added causes an error - preventing of duplication.
2017-04-26 14:59:15 +01:00
Remi Collet
f639b64dca rely on bundle config, instead of system one 2017-04-26 14:41:40 +02:00
Anatol Belski
8cfaea656c skip the test on OpenSSL < 1.1 for now 2017-04-26 14:39:03 +02:00
Jakub Zelenka
9fa347997a Fix bug #73833 (null character not allowed in openssl_pkey_get_private) 2017-04-24 17:11:36 +01:00
Anatol Belski
f7b8322b14 Support also no,shared configure arg vals by default
This indirectly fixes bug #74398 where --with-extname is expected to be
configured shared with our default dependency package. With a non
default deps, it still can be enforced --with-extname=static
2017-04-24 15:46:22 +02:00
Anatol Belski
f3c4e2f5bf extend zlib export required for the recent libpng 2017-04-23 21:33:14 +02:00
Jakub Zelenka
366b1640d0 Fix bug #73711 (Segfault in openssl_pkey_new when generating DSA or DH key) 2017-04-23 20:30:14 +01:00
Steve Walk
9b7f13cb1b
Avoid exact floating point comparison 2017-04-20 06:42:20 +01:00
Michael Heimpold
32c5b8efd6
ext/gettext: respect passed in library directory for all checks
A directory given to configure by --with-gettext=dir is only
used within the very first AC_CHECK_LIB. This is because the
temporary modified LDFLAGS variable is reset too early.

This results in functions not detected properly.

The original issue and patch was reported for OpenWrt/LEDE
distribution by @Dimazhan at:
https://github.com/openwrt/packages/issues/4250

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2017-04-17 08:11:40 +01:00
Craig Duncan
618d97962a
Fixed bug #74080 Add datetime constant for RFC7231 2017-04-17 08:08:54 +01:00
Fabien Villepinte
7dc6b04f45
Fixed bug #74439 Wrong reflection on the Locale methods 2017-04-17 07:56:47 +01:00
Anatol Belski
ca543ff01c improve/fix error handling
GetLastError() should not be called, if the function didn't fail.
2017-04-15 19:32:04 +02:00
Nikita Popov
0beccc51f1 Fix compact_literals of INIT_METHOD_CALL with CONST op1 2017-04-15 12:35:09 +02:00
Johannes Schlüter
35a28fac51 Add support for MySQL 8's Unicode types 2017-04-14 16:30:10 +02:00
Fabien Villepinte
f05d74feb8
Fixed bug #74433 Wrong reflection on the Normalizer methods 2017-04-13 13:21:05 +01:00
Fabien Villepinte
bc4bb7882b Fixed bug #74416 Wrong reflection on DOMNode::cloneNode 2017-04-13 07:07:24 +02:00
Christopher Jones
f4a41fe750 Fixed uninitialized data causing random crash (Dmitry) 2017-04-12 14:02:46 +10:00
Anatol Belski
8bba2df2eb Fix misleading typo in identifiers 2017-04-11 13:48:04 +02:00
Joe Watkins
b74b325aea
fixed bug #74413 wrong reflection on SQLite3::enableExceptions 2017-04-11 12:14:25 +01:00
Sebastian Bergmann
7cdf520319 Fix bug #74409 2017-04-11 08:27:17 +02:00
Nikita Popov
6e23f2bceb Forgot to commit test file... 2017-04-10 22:26:14 +02:00
Nikita Popov
6f950e83eb Fix JMPZ+JMP => NOP+JMP optimization 2017-04-10 22:09:34 +02:00
Joe Watkins
8c53c346d4
Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Fixed bug #74402 (segfault on random_bytes, bin2hex, openssl_seal)
2017-04-10 12:51:17 +01:00
Joe Watkins
d9e2f80375
Fixed bug #74404 (wrong reflection on DateTimeZone::getTransitions) 2017-04-10 12:48:51 +01:00
Xinchen Hui
42e576ace2 Fixed bug #74402 (segfault on random_bytes, bin2hex, openssl_seal) 2017-04-10 19:02:50 +08:00
Xinchen Hui
4bebcb84ad Fixed condition check 2017-04-10 14:47:24 +08:00
Mitch Hagstrand
d9a05807d2
Fix of Bug #74383: Wrong reflection on Phar::running 2017-04-10 06:32:15 +01:00
Xinchen Hui
9c7cb2cdcd Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Add NEWS
  Resolve bug #74188 (undefined statics raising with ?? operator)
  Fixed bug #72071: Prevent Max-Age from being negative
  Update NEWS with OpenSSL 1.1.0 support info
  Add OpenSSL 1.1.0 support to PHP 7.0
2017-04-10 11:49:44 +08:00
Xinchen Hui
341ff7119f Fixed bug #74379 (syntax error compile error in libmagic/apprentice.c) 2017-04-10 11:44:41 +08:00
Craig Duncan
ba6561d3cc Fixed bug #72071: Prevent Max-Age from being negative 2017-04-09 13:14:40 +02:00
Jakub Zelenka
cdc33251d2 Add OpenSSL 1.1.0 support to PHP 7.0 2017-04-07 19:21:33 +01:00
Yussuf Khalil
27120d4412 Fix invalid free of persistent results on error/connection loss in mysqlnd (bug 74376) 2017-04-05 20:57:03 +02:00
Anatol Belski
4ca3468e78 Revert "extend skip section"
This reverts commit 5136048064.

This is not needed anymore wrt dst handling fix
2017-04-04 16:21:23 +02:00
Moritz Fain
46d286574b Fixed bug #74341
Added support for ASN.1 UTCTime without seconds part (being 11 characters
long instead of 13).

Additionally, fixed incorrect handling of DST on systems without gmtoff.
2017-04-02 01:04:32 +02:00
Joe Watkins
ef3140e544
fix bug #74343 compile fails on solaris 11 with system libgd 2017-03-30 16:27:40 +01:00
Nikita Popov
d6f70f0ee3 Disable block pass for large functions
(Backport of 7ea261685f to 7.0.)
2017-03-28 22:07:37 +02:00
Anatol Belski
ee8b5de5a0 deps updated, cherry-pick 88642decf9 2017-03-27 19:38:20 +02:00
Anatol Belski
6da475367a add test for bug #74230 2017-03-27 19:33:51 +02:00
Derick Rethans
1f8fc0fb56 Forgot to update the output in the test too 2017-03-27 18:01:22 +01:00
Derick Rethans
eb5d4bcd4f Fixed test for #33415 due to data fixes. 2017-03-27 11:28:16 +01:00
Derick Rethans
eb13003f6c Updated to version 2017.2 (2017b) 2017-03-24 12:25:25 +00:00
Dmitry Stogov
1517fdb36c Fixed uninitialized data 2017-03-23 18:59:27 +03: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
Jakub Zelenka
6d066dc421 Lower timeout in test for but #72333 2017-03-20 16:07:12 +00:00
Nikita Popov
2e83082605 Fix bug #74265 2017-03-17 20:19:40 +01:00
Jakub Zelenka
df135ffa7a Make test 002 for bug #65538 not to use https in cafile 2017-03-17 19:07:32 +00:00
Jakub Zelenka
53e2c9158d Consume data by server in test for bug #72333
Client should be able to write more data and prevent time out
2017-03-17 18:11:50 +00:00
Jakub Zelenka
0c8ad36d92 Make test for bug #72333 a bit more reliable 2017-03-16 18:11:56 +00:00
Adam Saponara
98f4ce9363 Return FALSE if error_log fails to write all bytes 2017-03-16 12:56:36 +01:00
Matt Bonneau
7fba8bda4c Fixed bug #74240 (deflate_add can allocate too much memory) 2017-03-15 00:08:32 +01:00
Jakub Zelenka
ba70478a21 Skip bug74159 test for OpenSSL lower than 1.0.1 2017-03-14 18:13:57 +00:00
Jakub Zelenka
8e5d080d54 Tidy up test for bug72333 2017-03-14 18:13:57 +00:00
Jakub Zelenka
f0e67d1a56 Speed up test for bug72333
It reliably fails without the xp_ssl.c so it is good with smaller usleep
2017-03-14 18:13:57 +00:00
Jakub Zelenka
411f4b1b6f Fix indent and add comment 2017-03-14 18:13:57 +00:00
Jakub Zelenka
760ff21bf3 Tidy up setting of SSL_MODE_RELEASE_BUFFERS 2017-03-14 18:13:57 +00:00
Jakub Zelenka
53cc72ef86 Remove extra SSL mode settings 2017-03-14 18:13:57 +00:00
Jakub Zelenka
17e9fc9bfe Fix bug #72333 (fwrite() on non-blocking SSL sockets does not work) 2017-03-14 18:13:57 +00:00
Xinchen Hui
c398198c0a Fixed bug #74218 (ArrayIterator error message is confusing) 2017-03-10 15:15:31 +08:00
Thomas Orozco
247ce052cd Fixed bug #71003: Add PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT 2017-03-09 17:31:21 +01:00
mcq8
b224e74267 Fixed bug #72096 Swatch time value incorrect for dates before 1970 2017-03-09 16:44:02 +01: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
Dmitry Stogov
648b756f35 Fixed file-cache (Zend/tests/unused_shared_static_variables.phpt) 2017-03-03 16:10:46 +03:00
somedaysummer
fab5ce347c PHP bug #74004
Fix for DOMDocument loadHTML and loadHTMLFile ignore LIBXML_NOWARNING
and LIBXML_NOERROR flags.
2017-03-02 12:35:42 +01:00
Derick Rethans
cf60f26da6 Fixed tests after tzdb removed abbreviations 2017-03-02 11:28:02 +00:00
Derick Rethans
61e9b7354f Make sure we anchor this test to February 2017-03-02 11:27:44 +00:00
Mitch Hagstrand
29333550d2 Fix bug73858.phpt to work in months without 31 days
Used hardcoded months in bug73858.phpt rather than the current and previous
month.
2017-03-02 12:13:06 +01:00
Christopher Jones
e80ea04c79 Fixed bug #54379 (PDO_OCI: UTF-8 output gets truncated)
This was a modification of an incomplete PR #2276.
2017-03-02 15:28:01 +11:00
Derick Rethans
dfcb11d7d1 Updated to version 2017.1 (2017a) 2017-03-01 20:07:51 +00:00
Remi Collet
53a08fd07d make type consistent with glob_t.gl_pathc 2017-03-01 17:01:58 +01:00
Grundik
eac8166bd4 Fix bug #73127
gost-crypto hash was incorrect if input data contained long 0xFF
sequence, due to a carry-propagation bug.
2017-02-24 23:20:49 +01:00
Aaron Piotrowski
ff8a6b1232 Update test for bug #74159 2017-02-23 22:24:59 -06:00
Aaron Piotrowski
e9873d9853 Fix bug #74159
Thanks to @brzuchal for the patch to xp_ssl.c and @DaveRandom for helping debug the problem.
2017-02-23 20:59:43 -06:00
Xinchen Hui
330a7b62c3 Fixed bug #74152 (if statement says true to a null variable) 2017-02-23 12:33:17 +08:00
Xinchen Hui
1d4eead995 Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments) 2017-02-23 11:02:23 +08:00
Dmitry Stogov
593a4d8fe9 too many dashes 2017-02-21 10:47:48 +03:00
Dmitry Stogov
bd7e5c1548 Increase WSDL cache version (7.0 wsdl cache is incomatible with PHP-5)
Include WSDL cache version number into file name
2017-02-21 10:41:20 +03:00
Remi Collet
c836ad1c7e fix test for libzip 1.2.0 2017-02-19 17:02:00 +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
cf3ef36323 Fix memory errors in url rewriter
Strings aren't terminated here...
2017-02-16 17:24:07 +01:00
Nikita Popov
708973c9bd Fix autoload_func_info destruction
Can't reference the function ptr after the closure has been
destroyed.
2017-02-16 16:59:17 +01:00
Mitch Hagstrand
3b91ed112f Make the ftp and stream tests more reliable.
The tests can sometimes fail because it chooses a passive port for ftp that
is already in use. This makes the test attempt multiple times to find a free
port.
2017-02-16 12:46:55 +01:00
Nikita Popov
5432d6f982 Add json dep to test 2017-02-16 12:45:24 +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
eb1373e509 Revert "Fixed bug #74035"
This reverts commit 9ffc6ca62f.
2017-02-12 22:02:39 +01:00
Derick Rethans
f0519f4837 Upgrade timelib to 2017.01
This fixes:

- Fixed bug #72719 (Relative datetime format ignores weekday on sundays only).
- Fixed bug #73294 (DateTime wrong when date string is negative).
- Fixed bug #73489 (wrong timestamp when call setTimeZone multi times with UTC
  offset).
- Fixed bug #73858 (first/last day of' flag is not being reset).
- Fixed bug #73942 ($date->modify('Friday this week') doesn't return a Friday
  if $date is a Sunday).
- Fixed bug #74057 (wrong day when using "this week" in strtotime).
2017-02-12 20:17:01 +00:00
andrewnester
01c1afa79f Fixed bug #74021 2017-02-12 12:48:18 +01:00
Adam Saponara
7e5cf2aa19 Fixed bug #73118 2017-02-12 00:14:59 +01:00
Xinchen Hui
185304a61e Fixed bug #74019 (Segfault with list) 2017-02-10 14:24:01 +08: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
8a8aa67844 Revert "Fix detection of isnan and isinf"
This reverts commit 9ea0949f43.
2017-02-06 01:45:53 +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
dcaf4da8a6 Revert "Merge branch 'pull-request/2344' into PHP-7.0"
This reverts commit 6988d070ea, reversing
changes made to 75ad2b301a.
2017-02-03 18:42:10 +01:00
andrewnester
9ffc6ca62f Fixed bug #74035 2017-02-03 18:29:39 +01:00
somedaysummer
4df993d89d
Fixed bug #74004 LIBXML_NOWARNING (etc) ignored by DOMDocument::loadHTML 2017-02-03 06:08:42 +00:00
Matěj Humpál
acda2563ce Fix bug #74031
Fix incorrect parameter count for imagepng function
2017-02-02 18:13:53 +01:00
Anatol Belski
6fc0ae638a Fixed #74022 PHP Fast CGI crashes when reading from a pfx file. 2017-02-02 12:48:12 +01:00
Anatol Belski
3446e3b749 Revert "fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)"
This reverts commit 2fcf1259c6.
2017-02-01 19:59:24 +01:00
Anatol Belski
69a2e4ece2 Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"
This reverts commit 62938bf088.
2017-02-01 19:59:18 +01:00
Remi Collet
0e21d8066b fix test for 32bits (int -> float)
(cherry picked from commit 0f1ae93bfa)
2017-02-01 11:49:52 +01:00
Remi Collet
aa9742d80d fix test for 32bits (int -> float) 2017-02-01 10:25:30 +01:00
Sara Golemon
bf0f53270f Securely zero the hash context key 2017-01-30 08:57:17 -08:00
Anatol Belski
368958b3e4 Fixed bug #73983 crash on finish work with phar in cli + opcache
The file_cache_only option causes the storage to be per process,
furthermore the arena is destroyed per request. Thus, zend_string's
can't survive between request and the permanent flag should not
be set. This is already done with the file cache part, but the
persistency part is used in various scenarios and should respect
this case as well. In this particular bug, the pcre pattern cache
needs to survive between requests and uses pattern strings as hash
keys. One more case relevant here would be various situations where
the flow disables the use of shared memory.
2017-01-30 12:44:21 +01:00
jhdxr
62938bf088
fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454) 2017-01-30 11:25:04 +00:00
Anatol Belski
4b1afc829c move id initialization into ctor 2017-01-30 11:40:23 +01:00
Anatol Belski
2b7e5468c9 fix system id initialization for multiple threads 2017-01-30 01:54:36 +01:00
jhdxr
2fcf1259c6
fixed bug #50989 (DOM support for LIBXML_NOXMLDECL) 2017-01-28 08:27:05 +00:00
Mitch Hagstrand
a3d3f76827
Fix 00version.phpt when commit message has multiple lines.
The environment variable "TRAVIS_COMMIT_MESSAGE" can contain multiple lines.

An example can be seen here https://travis-ci.org/php/php-src/jobs/195465293
2017-01-26 11:36:24 +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
Arnout Boks
721a189742
Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)
The fix is based on the same strategy for handling namespace
declarations as used by getAttributeNode. Note that this strategy makes
these methods not return a DOMAttr for xmlns* attributes, but an
instance of the (undocumented) class DOMNameSpaceNode. This is not
really ideal, but at least this fix makes the behavior of
getAttributeNode and getAttributeNodeNS consistent.

A follow-up action would be to investigate whether DOMNameSpaceNode can
be made into a subclass of DOMAttr (which may be hard due to the way
libxml treats namespace declarations) or document this deviating return
value for xmlns* attributes.
2017-01-25 20:59:25 +00:00
Arnout Boks
737ee0661c
Added (failing) testcase for bug #54382 2017-01-25 20:59:23 +00:00
Christoph M. Becker
71efe9d8fd Add regression test for bug #47946
This bug had already been fixed, but apparently there's no regression
test yet, so we add one.

Note that the expected image has black pixel artifacts, which are
another issue (perhaps bug #40158), and would have to be adressed
separately.
2017-01-22 15:01:01 +01:00
Mitch Hagstrand
e56fe7e5e7
Fix intermittent segfault in GD library
The gdIOCtx struct should be zero filled with ecalloc.
emalloc does not zero fill the struct.
2017-01-22 06:40:55 +00:00
Christoph M. Becker
f67d599a01 Fix #73968: Premature failing of XBM reading
We must take into account the line padding, when we're reading XBM
files.

We deliberately ignore the potential integer overflow here, because
that would be caught by gdImageCreate() or even earlier if `bytes==0`,
what happens in libgd00094.phpt which we adapt accordingly.
2017-01-21 13:04:36 +01:00
andrewnester
21ac79e94b
Fixed #73959 - lastInsertId fails to throw an exception in pdsql 2017-01-20 20:10:55 +00:00
Remi Collet
f81b7df618 Fixed bug #73965 DTrace reported as enabled when disabled 2017-01-20 17:45:15 +01:00
Xinchen Hui
cad2598fcb Fixed another part in ldap (bug #73933) 2017-01-19 12:23:23 +08:00
Joe Watkins
f9226f9bf3
Fix bug #73949 leak in mysqli_fetch_object 2017-01-18 18:22:57 +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
Leigh
e7e96fe2e0 Change free to OPENSSL_free 2017-01-18 14:45:41 +00:00
Remi Collet
6af22d0d3e Fix #73956 Link use CC instead of CXX 2017-01-18 13:00:49 +01:00
Thomas Punt
a22f181736
Fix ce comparison 2017-01-18 05:05:53 +00:00
Anatol Belski
5d07438cb3 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix #73869: Signed Integer Overflow gd_io.c
  Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
2017-01-17 09:33:51 +01:00
Christoph M. Becker
d2274b01cb Fix #73869: Signed Integer Overflow gd_io.c
GD2 stores the number of horizontal and vertical chunks as words (i.e. 2
byte unsigned). These values are multiplied and assigned to an int when
reading the image, what can cause integer overflows. We have to avoid
that, and also make sure that either chunk count is actually greater
than zero. If illegal chunk counts are detected, we bail out from
reading the image.

(cherry picked from commit 5b5d9db3988b829e0b121b74bb3947f01c2796a1)
2017-01-17 09:30:58 +01:00
Christoph M. Becker
f1b2afc9d9 Fix #73868: DOS vulnerability in gdImageCreateFromGd2Ctx()
We must not pretend that there are image data if there are none. Instead
we fail reading the image file gracefully.

(cherry picked from commit cdb648dc4115ce0722f3cc75e6a65115fc0e56ab)
2017-01-17 09:30:43 +01:00
Xinchen Hui
b28c2e20ca Fixed bug #73933 (error/segfault with ldap_mod_replace and opcache) 2017-01-17 15:34:19 +08: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
Stanislav Malyshev
50b38322b9 Fix typo 2017-01-16 00:23:06 -08:00
Niklas Keller
cc9893eb44
Add test ini_set with invalid time zone
Wasn't covered before according to gcov.php.net.
2017-01-16 04:13:01 +00:00
Stanislav Malyshev
2c7909697a Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix test
2017-01-15 18:42:33 -08:00
Stanislav Malyshev
814966ad33 Fix test 2017-01-15 18:42:22 -08:00
Stanislav Malyshev
43d0f2abc5 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update more functions with path check
2017-01-15 17:32:26 -08:00
Stanislav Malyshev
0ab1af7d3e Update more functions with path check 2017-01-15 17:31:08 -08:00
Anatol Belski
4f19bb7af6 fix AppVeyor failures with Opcache enabled
opcache_reset() only schedules the restart. Under circumstances,
the follow up requests might run uncached, until the restart
condition is met. To mitigate the false positives caused by this
behavior, any tests using opcache_reset() should not be put in
between other tests. Thus, moving the corresponding test to be
executed last.
2017-01-15 21:13:15 +01:00
Yordan Gigov
60aff0bd30 Fixed bug #69993 2017-01-14 14:13:15 +01:00
Mitch Hagstrand
fbf655afbd
Added test for "opcache: print restart reason" to basic_logging.phpt 2017-01-14 07:32:55 +00:00
Alexander Polyakov
a4accc0e3e
opcache: print restart reason 2017-01-13 21:34:11 +00:00
Anatol Belski
aaaef22db6 fix remaining tests for Opcache runs
The fail reason here is the TMP change while both top and test
run same binary with opcache enabled.
2017-01-13 17:16:15 +01:00
Anatol Belski
8e993b427c ensure the end path wouldn't contain double slashes 2017-01-13 16:50:05 +01:00
Anatol Belski
3500262b7d templatize the resource number 2017-01-13 15:45:35 +01:00
Mitch Hagstrand
fd92b91188
Increase wait time for tests involving sockets to improve Travis relability
1. Increased sleep time from 25ms to 50ms
2. Added sleep to shutdown handlers
2017-01-13 06:45:04 +00:00
rfussenegger
bd75f9e613 Fix bug #69899 2017-01-12 21:13:39 +01:00
Joe Watkins
b2782c6dc5
Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Fixed bug #67707 IV not needed for ECB encryption mode, but it returns a warning
  Fixed #73907 (nextSibling property not included in var_dump of DOMNode)
  Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
  Fix glob-wrapper.phpt to not fail in Windows
  Fix #73893: A hidden danger of death cycle in a function of gd
2017-01-11 08:12:51 +00:00
Joe Watkins
51d487786c
Fixed bug #71219 configure script incorrectly checks for ttyname_r 2017-01-11 08:09:10 +00:00
Robrecht Plaisier
d9cd2876d9 Fixed bug #67707 IV not needed for ECB encryption mode, but it returns a warning 2017-01-10 23:42:44 +01:00
Arnout Boks
13edec75a3 Fixed #73907 (nextSibling property not included in var_dump of DOMNode) 2017-01-10 23:29:02 +01:00
Arnout Boks
07340553a5 Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
It seems fair to remove this warning, given that:

* it is not documented in the official documentation
* the $specified property, which has a similar 'not implemented' status,
  also does not trigger a warning
* it apparently hinders quite a lot of people during debugging, judging by
  the number of votes on the bug
2017-01-10 23:24:34 +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
Christoph M. Becker
15837bab8c Fix #73893: A hidden danger of death cycle in a function of gd
We remove the unused, but potentially dangerous functions.
2017-01-10 19:52:06 +01:00
marcosptf
dcaed51ba0
pull-request/1807:
test for dns_get_record
2017-01-10 13:55:31 +00:00
Sara Golemon
69fbe3a9ad Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix open_basedir check for glob:// opendir wrapper
2017-01-09 16:07:33 -08:00
Nikita Popov
69058f35f8 Un-XFAIL serialization test 2017-01-10 00:07:38 +01:00
Leigh
14c72cc582 Fix check for linux getrandom syscall 2017-01-09 23:29:07 +01:00
Sara Golemon
7e49e8e797 Fix open_basedir check for glob:// opendir wrapper
php_check_open_basedir() expects a local filesystem path,
but we're handing it a `glob://...` URI instead.

Move the check to after the path trim so that we're checking
a meaningful pathspec.
2017-01-09 11:02:50 -08:00
Joe Watkins
28f2959b83
Revert "set more suitable defaults for opcache in ini and code"
This reverts commit b655f2d632.

This has been deemed unsuitable for 7.0
2017-01-09 17:08:07 +00:00
Dmitry Stogov
4f1b24d974 Fixed bug #73896 (spl_autoload() crashes when calls magic _call()) 2017-01-09 15:11:33 +03:00
Joe Watkins
63e08cbef7
Merge branch 'pull-request/2291' into PHP-7.0
* pull-request/2291:
  set more suitable defaults for opcache in ini and code
2017-01-09 10:54:57 +00:00
Markus Staab
b655f2d632
set more suitable defaults for opcache in ini and code 2017-01-09 10:53:23 +00:00
Xinchen Hui
f7cb79431f Fixed bug #73854 (Always true condition in php_openssl_sockop_io) 2017-01-09 16:30:00 +08:00
Joe Watkins
8dd523a216
Fixed bug #72979 money_format stores wrong length on AIX 2017-01-09 05:31:41 +00:00
Joe Watkins
8c653c163a
update ip2long_varation2 test to skip for AIX, see bug #72973 2017-01-09 05:24:44 +00:00
Joe Watkins
b8215c0817
Fixed #72974 imap is undefined service on AIX 2017-01-09 05:15:21 +00:00
Mitch Hagstrand
47007455dc
Fix FTP tests for Travis CI.
This suppresses the errors from stream_socket_server() until
server.inc will not make anymore attempts.
2017-01-09 00:36:39 +00:00
Nikita Popov
b36f4ac708 deflate_add(): Don't add unnecessary +1 to size
zend_string_realloc will do this by itself.
2017-01-08 13:47:20 +01:00
Nikita Popov
ec1b7b933d Fix OOB read introduced by previous commit
Ooops...
2017-01-08 00:01:05 +01:00
Rowan Collins
5146d9f8ac http_fopen_wrapper.c - Handle HTTP headers with varying white space
The stream handler assumed all HTTP headers contained exactly one space,
but the standard says there may be zero or more. Should fix Bug #47021,
and any other edge cases caused by a web server sending unusual spacing,
e.g. the MIME type discovered from Content-Type: can no longer contain
leading whitespace.

We strip trailing whitespace from the headers added into
$http_response_header as well.
2017-01-07 23:54:57 +01:00
Andreas Heigl
fc777296bf
Adapts the readme to the new test-possibility
This commit introduces a way to use a vagrant setup to test against a
known LDAP without the need to setup an LDAP on your own machine
2017-01-07 16:45:10 +00:00
Anatol Belski
486fc0424a Implement github PR #1736
This fixes leak issues on *BSD systems, as described in the PR.
2017-01-07 15:36:14 +01:00
Joe Watkins
b351ec8baf
Merge branch 'pull-request/2283' into PHP-7.0
* pull-request/2283:
  Fix memleaks from #1755 and some pre-existing ones
2017-01-07 10:14:36 +00:00
Leigh
21f287915c Remove superfluous variable reinit 2017-01-07 09:43:05 +00:00
Craig Duncan
98c2cd4311
PR #2211 don't supress warnings in tests 2017-01-07 08:06:38 +00:00
Mitch Hagstrand
3401f553b9 Fixes for session and fpm tests in PHP7.0 branch
1. Increased the timeout on sapi/fpm tests to match the cli server
2. Disabled session GC in session_set_save_handler_basic.phpt
3. Fixed GC in save_handler.inc to delete files based on age
2017-01-06 19:55:57 -08:00
Mitch Hagstrand
4568618030 Revert "Test request47456.phpt for PR 1303" on PHP-7.0 and PHP-7.1
This reverts commit e55e93a1e3.
This change should only apply to master. Not PHP-7.0 or PHP-7.1
2017-01-07 02:04:03 +01:00
Dorin Marcoci
826122fa8e Return integer field types as native integers instead of strings
Use another define for better compatibility

Test case for #72583 Feature. Small optimisations.

Adjust conditional directives according to coding standards

Add more compatibility for "end of line" on multiple environements

Updated execute.phpt test after switching to integer mapping
2017-01-06 17:43:46 +01:00
Mitch Hagstrand
e55e93a1e3
Test request47456.phpt for PR 1303
After merging PR 1303 unmatched subpatterns are set to NULL
2017-01-06 16:22:11 +00:00
Leigh
62e9e1fecd Some commentary, change free method 2017-01-06 15:49:15 +00:00
Leigh
9a0dac124e Conditionally free depending on how assignment happened 2017-01-06 15:24:37 +00:00
Leigh
053b966134 Fix memleaks from #1755 and some pre-existing ones 2017-01-06 14:58:54 +00:00
Mitch Hagstrand
ad08aa3956 Fix #70103: Fix bug 70103 when ZTS is enabled
Used snprintf to copy the basename string before it is freed
2017-01-06 15:26:17 +01:00
Joe Watkins
ba0751a915
Merge branch 'pull-request/1809'
* pull-request/1809:
  test for function curl_multi_info_read();
2017-01-06 08:06:38 +00:00
Joe Watkins
2d42423953
Merge branch 'pull-request/1755'
* pull-request/1755:
  Fix bug #71519 Add 'serialNumberHex' variable to openssl_x509_parse
2017-01-06 07:43:59 +00:00
Joe Watkins
3a79f35fdc
add stream_socket_sendto test from PR #1804 2017-01-06 07:27:31 +00:00
Joe Watkins
ff6b309c6f
Merge branch 'pull-request/1588' into PHP-7.0
* pull-request/1588:
  Fixed #69442 closing of fd incorrect when PTS enabled
2017-01-06 06:56:50 +00:00
Joe Watkins
b0ff9ee688
Merge branch 'pull-request/1360' into PHP-7.0
* pull-request/1360:
  Fixed bug #69582 session not readable by root in CLI
  news entry for PR #1360
2017-01-06 06:05:17 +00:00
Joe Watkins
a49aaf9ab0
Merge branch 'pull-request/1430' into PHP-7.0
* pull-request/1430:
  Fix #70103: ZipArchive::addGlob ignores remove_all_path option
  news entry for PR 1430
2017-01-06 05:39:48 +00:00
Remi Collet
db890956ec add skip when json not loaded 2017-01-06 06:23:59 +01:00
Christoph M. Becker
995ecffbb2 Fix #70417: PharData::compress() doesn't close temp file
According to the comment, it has not been deemed necessary to close compressed
files. However, we don't want to keep unclosed file handles to save ressources.
So we're also closing compressed archives, if they're not aliased.
2017-01-05 14:12:31 +01:00
Nikita Popov
2022dacb99 Merge branch 'PHP-5.6' into PHP-7.0 2017-01-05 11:38:05 +01:00
Nikita Popov
900b17b15f Fix printf modifier 2017-01-05 11:37:06 +01:00
Nikita Popov
b47c49d7a0 Merge branch 'PHP-5.6' into PHP-7.0 2017-01-05 00:24:25 +01:00
Nikita Popov
f697874e3f Add tests for delayed __wakeup() 2017-01-05 00:21:48 +01:00
Nikita Popov
0426b916df Implement delayed __wakeup 2017-01-05 00:21:48 +01:00
Sammy Kaye Powers
6550f3ad7e Update copyright header to 2017 in calendar.c 2017-01-04 11:15:47 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Dorin Marcoci
e914abff1e Fix PDO tests to match SQL standard syntax and pass Firebird tests. 2017-01-03 17:48:52 +01:00
Nikita Popov
b3889d4b20 Fix build 2017-01-03 12:16:35 +01:00
Vince
cfd6e14842 Fix Bug #73462 - Persistent connections don't set $connect_errno
Persistent connections skipped resetting $connect_error and $connect_errno values
This adds the "clear error" line to persistent connections for consistency
2017-01-03 12:13:08 +01:00
Joe Watkins
ff4e330eae
Merge branch 'pull-request/1905'
* pull-request/1905:
   pack()/unpack() for Big Endian float/double and Little Endian float/double
2017-01-03 10:50:19 +00:00
Rasmus Lerdorf
19b757dacd Fix opcache test dependencies 2017-01-02 22:30:28 -08:00
Stanislav Malyshev
68ac602b28 Use correct string release function 2017-01-02 22:08:25 -08:00
Stanislav Malyshev
ea6e54aff3 Fix error reporting 2017-01-02 21:59:44 -08:00
Stanislav Malyshev
a6cdefe043 Merge branch 'PHP-7.0.15' into PHP-7.0
* PHP-7.0.15:
  Fix #73832 - leave the table in a safe state if the size is too big.
  Fix bug #73831 - NULL Pointer Dereference while unserialize php object
2017-01-02 21:35:42 -08:00
Stanislav Malyshev
7f0de1a138 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #73737 FPE when parsing a tag format
  Fix bug #73773 - Seg fault when loading hostile phar
  Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data()
  Fix bug #73768 - Memory corruption when loading hostile phar
  Fix int overflows in phar (bug #73764)
2017-01-02 21:01:35 -08:00
Stanislav Malyshev
fa2125df67 Merge branch 'PHP-5.6.30' into PHP-5.6
* PHP-5.6.30:
  Fix bug #73737 FPE when parsing a tag format
  Fix bug #73773 - Seg fault when loading hostile phar
  Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data()
  Fix bug #73768 - Memory corruption when loading hostile phar
  Fix int overflows in phar (bug #73764)
2017-01-02 20:56:32 -08:00
Nikita Popov
e1e5caf9d4 Fix early free 2017-01-03 02:12:28 +01:00
Nikita Popov
593b6cd0a8 Optimize get_browser() using prefix and contains checks
Avoid expensive regex compilations by checking for prefix
and contained segments beforehand.
2017-01-02 23:31:27 +01:00
Nikita Popov
b06fb88cf9 Optimize browscap loading and representation
Avoid many string duplications, use interning (browscap-local, of
course), reduce pattern size, use more compact key-value
representation, build result array only on demand.
2017-01-02 23:30:56 +01:00
Nikita Popov
76a1d3f153 Add get_browser() test against larger corpus
Testing corpus provided by Anatol against current browscap.ini lite.

About 30% of all agents are not recognized by this browscap.ini,
but this should give us decent coverage.
2017-01-02 23:30:27 +01:00
Mitch Hagstrand
c019d33267
Fix for nowait.phpt failing intermittently
The parent process was releasing the child semaphore
after the child process continued execution. Now
the child semaphore is released before the child
process continues execution.
2017-01-02 16:44:43 +00:00
vanviegen
732f67ee6f
Fix for sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE
Fixes bug #73800

news entry for PR #2250
2017-01-02 14:54:45 +00:00
Arnout Boks
a8955926c2
Fixed #67474 (getElementsByTagNameNS and default namespace)
This bug was caused by the fact that dom_get_elements_by_tag_name_ns_raw
uses an empty string to filter on the default namespace (as NULL means
'no filter'), whereas in the node itself the default namespace is
signalled by nodep->ns being null.
2017-01-02 11:56:37 +00:00
Arnout Boks
19c4a2ef19
Add (failing) testcase for bug #67474 2017-01-02 11:56:33 +00:00
Joe Watkins
3e798c4a5f
Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src: (146 commits)
  Flush stderr on win32 in cli_log_message
  Fixed bug #73154
  FIx bug #70213
  Fix dom class can't be inherited by the internal class
  Another try at making concat_003 more reliable
  Fix flaky openssl_pkey_new test
  Make Opcache tests using the cli server more reliable
  Revert "Fix #73530: Unsetting result set may reset other result set"
  define php_ap_map_http_request_error function for older httpd only
  add old versions of httpd support
  Disable AppVeyor fast_finish
  Makes the sapi web server and curl tests more reliable
  Fixes the curl tests to be more reliable in Travis CI
  Interpretation of curl_setopt values for boolean parameters
  Fixes #65689. PDO_Firebrid / exec() does not free allocated statement.
  Fix alpn_ctx leaking in openssl
  Fixed bug #73373 (deflate_add does not verify that output was not truncated)
  Fix IS_UNDEF comparisons in opcache
  Fixed bug #73704 (phpdbg shows the wrong line in files with shebang)
  Increase timing quota for small string concat test
  ...
2017-01-02 09:44:02 +00:00
Mitch Hagstrand
e077735b03
Fix nowait.phpt to no longer depend on sleeping
In Travis CI the nowait.phpt test sometimes fails because of
the usleep() not being long enough ensure proper
execution order. Instead of depending on sleeping the
test now uses two semaphores to guarantee execution order.
2017-01-02 09:43:47 +00:00
Nikita Popov
935b5cb11e Flush stderr on win32 in cli_log_message
This allows us to unfork a bunch of tests for Windows.
2017-01-01 21:09:02 +01:00
Nikita Popov
4877641962 Fixed bug #73154
The object that is being serialized may be destroyed during the
execution of __sleep(), so operate on a copy instead.
2017-01-01 19:24:41 +01:00
Nikita Popov
9f560baef5 Merge branch 'PHP-5.6' into PHP-7.0 2017-01-01 14:12:26 +01:00
Nikita Popov
a65ad951ad FIx bug #70213 2017-01-01 14:10:49 +01:00
dreamszhu
3c977618e1 Fix dom class can't be inherited by the internal class 2017-01-01 12:20:04 +01:00
Stanislav Malyshev
8d2539fa0f Fix bug #73831 - NULL Pointer Dereference while unserialize php object 2016-12-31 20:14:20 -08:00
Stanislav Malyshev
1cda0d7c2f Fix bug #73737 FPE when parsing a tag format 2016-12-31 19:31:49 -08:00
Stanislav Malyshev
e5246580a8 Fix bug #73773 - Seg fault when loading hostile phar 2016-12-31 18:47:50 -08:00
Stanislav Malyshev
16b3003ffc Fix bug #73825 - Heap out of bounds read on unserialize in finish_nested_data() 2016-12-30 16:59:46 -08:00
Stanislav Malyshev
b28b8b2fee Fix bug #73768 - Memory corruption when loading hostile phar 2016-12-30 15:57:24 -08:00
Stanislav Malyshev
ca46d0acbc Fix int overflows in phar (bug #73764) 2016-12-30 15:39:48 -08:00
Nikita Popov
78675ebd9a Fix flaky openssl_pkey_new test
Public key size may vary by one bit... switch to using %d for
key sizes.
2016-12-29 20:59:28 +01:00
Mitch Hagstrand
d0fcc74110 Make Opcache tests using the cli server more reliable
Same fix already applied to ext/curl/tests/server.inc
and sapi/cli/tests/php_cli_server.inc

1. Increases the amount of time for the PHP built-in server to accept a connection
2. Outputs an error if the PHP built-in server fails
2016-12-29 20:56:45 +01:00
Christoph M. Becker
88d1a2c5aa Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Revert "Fix #73530: Unsetting result set may reset other result set"

# Conflicts:
#	ext/sqlite3/sqlite3.c
2016-12-29 13:47:28 +01:00
Christoph M. Becker
2ba3b27594 Revert "Fix #73530: Unsetting result set may reset other result set"
This reverts commit eb570294a2.

That commit caused a regression, so it's probably best to revert it, and
to tackle the issue for the next minor release.
2016-12-29 12:59:04 +01:00
Mitch Hagstrand
2d51267c07 Makes the sapi web server and curl tests more reliable
1. Increased the time for the sapi/cli/tests/php_cli_server.inc to accept connections.
2. sapi/cli/tests/php_cli_server.inc has errors messages and a `stop` function.
3. bug67429.phpt uses the `stop` function to shutdown the webserver before starting a new one.
4. Removed ext/curl/tests/bug48203_multi-win32.phpt test now that ext/curl/tests/bug48203_multi.phpt
   runs on Windows also.
2016-12-27 21:52:05 +01:00
Mitch Hagstrand
92678d1a83 Fixes the curl tests to be more reliable in Travis CI
1. Increases the amount of time for the PHP built-in server to accept a connection
2. Outputs an error if the PHP built-in server fails
3. In bug48203_multi.phpt the test no longer starts and stops multiple PHP built-in servers
2016-12-27 21:52:05 +01:00
dedal.qq
7f29e7c678 Interpretation of curl_setopt values for boolean parameters 2016-12-25 22:32:49 -08:00
Dorin Marcoci
e926bf6507 Fixes #65689. PDO_Firebrid / exec() does not free allocated statement. 2016-12-25 22:06:20 -08:00
Bob Weinand
ac1372d811 Fix alpn_ctx leaking in openssl 2016-12-22 23:34:07 +01:00
Bob Weinand
8823b68c41 Fixed bug #73373 (deflate_add does not verify that output was not truncated) 2016-12-22 15:29:36 +01:00
Sébastien Santoro
25c96f92f4 Fix IS_UNDEF comparisons in opcache
These conditions were formerly `!q->pData` and `!p->pData`, and should
now be detected as undefined variables, using the special type IS_UNDEF.

Incidentally, this syntax raised a logical-not-parentheses compiler
warning, now gone.
2016-12-22 12:46:14 +01:00
Dorin Marcoci
eb33d08f1e Compatibility with Firebird & Oracle select syntax. 2016-12-19 01:06:24 +01:00
Anatol Belski
88c1491c6d fix proto 2016-12-19 00:50:29 +01:00
Dorin Marcoci
cf46ac1179 Cursor is not opened on singleton selects.
Test case for unregistered bug on FB3 singleton selects

Set error mode to warning instead of exception.
2016-12-18 21:53:51 +01:00
Anatol Belski
3e48baa49d fix arg spec and datatype, follow up on 73594 2016-12-18 21:16:35 +01:00
Bruce Weirdan
c78fd4568e Fixed bug #73594
Skip the tests when local resolver does not behave

* Added SKIPIF sections to check local resolver
* Added test to check $authns parameter
2016-12-18 20:44:33 +01:00
Nikita Popov
c1af9f282f Fix bug #46103 2016-12-18 17:10:19 +01:00
Nikita Popov
eb636fcb56 Add test for get_browser() in object mode
All other tests only check array return values...
2016-12-18 13:16:25 +01:00
Anatol Belski
58a945cf68 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix C89 compat
2016-12-17 20:45:22 +01:00
Anatol Belski
79e47aae41 fix C89 compat 2016-12-17 20:43:32 +01:00
Sara Golemon
5004ae2b62 Silence warning from unhandled enum
(cherry picked from commit 57bbe2c140)
2016-12-17 00:12:33 +01:00
Anatol Belski
2f9e928af8 fix leaking streams and memory mapped files
(cherry picked from commit f1ff23095b)
2016-12-17 00:12:19 +01:00
Anatol Belski
8bc3f179ce make timing check more forgiving in these tests
Particularly on slower VMs, the sporadic fails can still happen.
The timing is kept in an uncritical range, but allows the tests
pass there. Mayby, it'd make sense to introduce a new group for
this kind of tests, so tests requiring exact time measurement
can be avoided on unsuitable environments.
2016-12-15 12:20:37 +01:00