Commit Graph

740 Commits

Author SHA1 Message Date
Stanislav Malyshev
d25e67eee6 Fix bug #71629: sync php_url_decode definition 2016-02-21 17:11:34 -08:00
Stanislav Malyshev
e231830f16 Merge branch 'PHP-5.6.18' into PHP-7.0.3
* PHP-5.6.18:
  fix tests
  fix NEWS
  Update NEWS
  update NEWS
  Fixed bug #71488: Stack overflow when decompressing tar archives
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  Fix bug #71459 - Integer overflow in iptcembed()
  prepare 5.6.18RC1
  Fix test when run with openssl < 1.0.2 (reorder so no more SSLv2 message) Fix skip message to work
  improve fix for bug #71201
  Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input
  Fix bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata()
  Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()
  Fix bug #71335: Type Confusion in WDDX Packet Deserialization
  Fix bug #71354 - remove UMR when size is 0

Conflicts:
	configure.in
	ext/phar/dirstream.c
	ext/phar/phar_object.c
	ext/phar/tar.c
	ext/standard/exec.c
	ext/standard/iptc.c
	ext/standard/math.c
	ext/standard/streamsfuncs.c
	ext/wddx/wddx.c
	main/php_version.h
	main/streams/memory.c
2016-02-01 20:00:01 -08:00
Stanislav Malyshev
309ead112f Merge branch 'PHP-5.5.32' into PHP-5.6.18
* PHP-5.5.32:
  Fixed bug #71488: Stack overflow when decompressing tar archives
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  Fix bug #71459 - Integer overflow in iptcembed()
  Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input
  Fix bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata()
  Fix bug #71335: Type Confusion in WDDX Packet Deserialization
  Fix bug #71354 - remove UMR when size is 0
2016-02-01 18:32:31 -08:00
Stanislav Malyshev
6297a117d7 Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input 2016-01-16 22:10:54 -08:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
da028e0757 This should be better 2015-12-30 05:10:05 -08:00
Caleb Champlin
6ff014b31c Make sure context is set to null to prevent use after free 2015-11-09 11:58:34 +08:00
Bob Weinand
855bb36fd0 Add support for IPV6_V6ONLY on sockets 2015-11-06 21:45:31 +01:00
Dmitry Stogov
c67fc6bb09 Fixed memory leak in php_stream_context_set_option() 2015-10-29 20:06:55 +03:00
Dmitry Stogov
560e4fa393 Removed or simplified incorrect SEPARATE_*() macros usage. 2015-09-29 11:17:43 +03:00
Anatol Belski
9d82a7dc98 add overflow check 2015-09-02 17:05:45 +02:00
Anatol Belski
797e30f4fc Fixed bug #70198 Checking liveness does not work as expected 2015-08-11 17:36:10 +02:00
Anatol Belski
20e765b841 Fixed bug #69900 Too long timeout on pipes 2015-07-28 10:28:45 +02:00
Xinchen Hui
9834cd9339 Revert "Revert "suggest parentheses around ‘&&’ within ‘||’""
This reverts commit ec1e8929c4.
2015-08-11 22:34:39 +08:00
Xinchen Hui
ec1e8929c4 Revert "suggest parentheses around ‘&&’ within ‘||’"
This reverts commit 4f2c0e0451.
2015-08-11 22:14:37 +08:00
Xinchen Hui
4f2c0e0451 suggest parentheses around ‘&&’ within ‘||’ 2015-08-11 21:43:38 +08:00
Anatol Belski
7eb6bd1311 add EAGAIN checks
EAGAIN and EWOULDBLOCK should be checked together and don't necessary,
have same value. So checking both is better for portability.
2015-08-11 15:17:25 +02:00
Anatol Belski
24f0fe6b1f Fixed bug #70198 Checking liveness does not work as expected 2015-08-11 14:40:34 +02:00
Anatol Belski
6f3dd4d45b fix pipe peek timeout 2015-07-02 15:19:38 +02:00
Christoph M. Becker
58b982afed Fix alignment on 32-bit 2015-07-02 14:23:07 +02:00
Anatol Belski
4e5758f377 fix c/p issue 2015-07-02 14:22:58 +02:00
Anatol Belski
734d907aa4 initial stuff to make allow blocking pipes on windows 2015-07-02 14:22:55 +02:00
Dmitry Stogov
7aa7627172 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 13:59:27 +03:00
Bob Weinand
6ad9cd5367 Only call stream_flush if anything was written
This avoids flushing in readonly mode upon close
2015-06-30 03:49:54 +02:00
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Anatol Belski
c444c4172f further cleanups with S_IF* macros generalized declarations 2015-05-25 18:03:28 +02:00
Di Wu
c7492ed224 Fix undeclared identifier 'PHP_STREAM_KEEP_RSRC'
Identifier named `PHP_STREAM_FREE_KEEP_RSRC`  but use `PHP_STREAM_KEEP_RSRC`

Reference Line 131
2015-04-09 18:16:53 +02:00
Dmitry Stogov
4d9a1883aa Fixed bug #68887 (resources are not freed correctly) 2015-04-08 13:29:42 +03:00
Dmitry Stogov
b8ba3203e5 Cleanup 2015-04-07 14:19:12 +03:00
Anatol Belski
69c2e53419 no more winxp, but really 2015-04-04 20:39:04 +02:00
Dmitry Stogov
d146d15003 Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate() 2015-03-20 02:02:42 +03:00
Anatol Belski
184793b5c1 fix condition 2015-03-19 22:33:16 +01:00
Anatol Belski
f43cc2a19a use portable fseek 2015-03-11 21:46:37 +01:00
Daniel Lowrey
2dec21634c Revert "Add stream_socket_crypto_info() function"
This reverts commit 13acb7ec65.

With the added capability to negotiate application layer protocols
via the TLS ALPN extension userland needs a method to access the
negotiated protocol on a given stream. The reverted commit added
a new stream_socket_crypto_info() function for this purpose.

This original approach was discarded in favor of using the
already-existing stream_get_meta_data() API which specifically
exists for just such purposes and requires the addition of no new
functions.
2015-03-09 23:15:57 -06:00
Wei Dai
22a61cea33 Fixed build 2015-03-09 15:21:08 +08:00
Julien Pauli
2f06413340 Fix #67626 2015-03-08 23:45:11 -07:00
Stanislav Malyshev
0f333fa93c Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  added missing parentheses
  Fix #67626
  Fix #63486

Conflicts:
	main/streams/userspace.c
2015-03-08 23:41:30 -07:00
Julien Pauli
7d47d9fe23 Fix #67626 2015-03-08 23:40:55 -07:00
Stanislav Malyshev
43b426fbc4 Merge branch 'pull-request/1106' into PHP-5.5
* pull-request/1106:
  Fix #67626
2015-03-08 22:52:21 -07:00
Reeze Xia
609f05fc19 ZTS cleanup 2015-03-08 19:25:55 +08:00
Daniel Lowrey
3e0a1a71e9 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug (#69195 Inconsistent stream crypto values across versions)

Conflicts:
	ext/standard/http_fopen_wrapper.c
2015-03-05 21:18:09 -07:00
Daniel Lowrey
10bc5fd4c4 Fixed bug (#69195 Inconsistent stream crypto values across versions)
PHP 5.6.0 altered the semantics of the following constants:

- STREAM_CRYPTO_METHOD_SSLv23_CLIENT
- STREAM_CRYPTO_METHOD_SSLv23_SERVER
- STREAM_CRYPTO_METHOD_TLS_CLIENT
- STREAM_CRYPTO_METHOD_TLS_SERVER

Instead of representing the SSLv23_*() handshake methods the v23
constants were changed to allow only SSLv2 or SSLv3 connections.
Likewise, the TLS methods were modified from using only the TLSv1
handshake to allowing TLS1,1.1, and 1.2. This created a situation
in which users upgrading from previous versions faced a potential
security degradation if they did not update code to use different
constants. In the interest of compatibility across PHP versions
the original semantics have been restored with the following
caveat:

**IMPORTANT**

The SSLv23 client/server methods will no longer negotiate the use
of the insecure SSLv2 or SSLv3 protocols by default. Users wishing
to allow these protocols must explicitly add them to the method
bitmask via the appropriate flags.
2015-03-05 21:09:39 -07:00
Daniel Lowrey
88cfc6ccb6 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix stream_select() issue with OpenSSL buffer

Conflicts:
	main/streams/streams.c
2015-03-05 17:53:04 -07:00
Chris Wright
e7df9d710c Fix stream_select() issue with OpenSSL buffer
Ensure data from OpenSSL internal buffer has been
transfered to PHP stream buffer before a select()
emulation operation is performed

Addresses bug #65137
https://bugs.php.net/bug.php?id=65137

Conflicts:
	ext/openssl/xp_ssl.c
2015-03-05 17:18:14 -07:00
Dmitry Stogov
6d065a8545 Avoid repeatable strlen() calls 2015-03-05 18:18:39 +03:00
Reeze Xia
c498cc7407 Merge branch 'pull-request/1142'
* pull-request/1142:
  Fixed wrong parameter type of php_stream_mmap_range()
2015-03-05 17:05:21 +08:00
Daniel Lowrey
b5d97140c0 Merge branch 'tls-alpn'
* tls-alpn:
  Improve test to target specific issue
  Misc updates/cleanup
  Add TLS ALPN extension support in crypto client/server streams
  Add stream_socket_crypto_info() function
  Update for compatibility with newer openssl libs
2015-03-04 13:56:58 -07:00
Reeze Xia
2dac92b244 Silence a empty while loop warning 2015-03-04 11:34:53 +08:00
Reeze Xia
98766e6375 Fixed wrong parameter type of php_stream_mmap_range()
There are several warings about this.
The mode type should be php_stream_mmap_access_t but not php_stream_mmap_operate_t
2015-03-04 11:28:14 +08:00