Commit Graph

41737 Commits

Author SHA1 Message Date
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
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