Commit graph

1392 commits

Author SHA1 Message Date
Christoph M. Becker
200f16fcf7
Fix GH-17855: CURL_STATICLIB flag set even if linked with shared lib
We must define `CURL_STATICLIB` only when building against a static
libcurl.  The detection relies on our usual naming conventions, what
should be revised in the future (possibly using pkg-config, or
switching to CMake).

Closes GH-17857.
2025-02-21 13:08:01 +01:00
Christoph M. Becker
47931a426e
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix curl_basic_022.phpt for libcurl 8.12.0
2025-02-05 19:22:51 +01:00
Christoph M. Becker
856866ef24
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix curl_basic_022.phpt for libcurl 8.12.0
2025-02-05 19:22:20 +01:00
Christoph M. Becker
36d46a4732
Fix curl_basic_022.phpt for libcurl 8.12.0
Due to a deliberate change in libcurl, the expiration is now capped to
at most 400 days.  We could solve this by choosing another date roughly
a year in the future, but would need to update the test next year.
This would be especially annoying for security branches.

Another option would be to actually parse the cookie list lines, but
that might not be worth the trouble.  Instead we just ignore the exact
timestamp created by libcurl.

[1] <https://github.com/curl/curl/pull/15937>

Closes GH-17709.
2025-02-05 19:20:47 +01:00
Niels Dossche
89060216a3
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix various memory leaks in curl mime handling
2024-11-26 20:37:51 +01:00
Niels Dossche
a80f0b515a
Fix various memory leaks in curl mime handling
Closes GH-16745.
2024-11-26 20:37:22 +01:00
Niels Dossche
179ca2bf2a
Fix GH-16802: open_basedir bypass using curl extension
And fix a memleak while here.

Closes GH-16804.
2024-11-15 21:17:36 +01:00
Christoph M. Becker
85e23dbbb2
Update FreeBSD CI
FreeBSD 13.2 is no longer supported[1], and apparently the respective
Cirrus CI image has been removed.  We update to FreeBSD 13.3.

This also requires to disable some compiler warnings now, and adapt a
test case.

[1] <https://www.freebsd.org/security/#sup>
[2] <3304488820>

Co-authored-by: David Carlier <devnexen@gmail.com>

Closes GH-16817.
2024-11-15 18:20:48 +01:00
Ilija Tovilo
25c0993902
Backport CI fixes to security branches
Closes GH-16469

Working towards GH-16286

commit e0db221143b808d97bc3a44e9f0968c6308794b4
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date:   Fri Oct 25 22:48:20 2024 +0200

    Move CFLAGS into ./configure command for consistency

commit 8ad67768250d181cd7fef30e0c866625bbd8ac94
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date:   Fri Oct 25 22:47:03 2024 +0200

    Also upgrade nightly to macOS 13

commit 58a88ccb9f
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date:   Wed Oct 23 19:07:59 2024 +0200

    Fix call to dc[n]gettext in tests with 0 $category

    This causes a segfault on PHP-8.1

commit 611af05c50
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date:   Fri Dec 8 13:36:52 2023 +0100

    [skip ci] Skip intermittently failing curl test on macOS

    The test fails with "CURL ERROR: 56". I will create an issue for it shortly.

commit ec745178bb
Author: Ilija Tovilo <ilija.tovilo@me.com>
Date:   Wed Oct 23 19:05:32 2024 +0200

    Backport parts of 9999a0c for gettext

    See 9999a0cb75

commit 5ce703496f
Author: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date:   Sun Jul 28 14:34:26 2024 +0200

    Fix CI failure on macOS after Curl update

commit 714a3e7071
Author: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date:   Sat Jul 27 16:09:50 2024 +0200

    Fix CI failure after Curl update (#15124)

commit 4f2eb921b9
Author: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date:   Thu May 23 22:20:37 2024 +0200

    Fix GH-14307: Test curl_basic_024 fails with curl 8.8.0

    Curl changed the behaviour, from the changelog:
      - lib: make protocol handlers store scheme name lowercase curl/curl@c294f9c

    From the docs: "The returned scheme might be upper or lowercase. Do
    comparisons case insensitively."

    Closes GH-14312.

commit 251195b41b
Author: Ayesh Karunaratne <ayesh@aye.sh>
Date:   Thu Feb 1 02:03:55 2024 +0700

    ext/curl: Fix failing tests due to string changes in libcurl 8.6.0

    Upstream libcurl 8.6.0 contains a change[^1] that caused a test failure.
    This fixes it by updating the test's `EXPECTF` to use a regex to account for both string patterns.

    [^1]: 45cf4755e7 (diff-a8a54563608f8155973318f4ddb61d7328dab512b8ff2b5cc48cc76979d4204cL1683)

    Closes GH-13293.

commit fc5d83f2b1
Author: Christoph M. Becker <cmbecker69@gmx.de>
Date:   Wed Oct 16 22:46:20 2024 +0200

    Prepare for necessary move to macOS 13

    GH will remove macOS 12 runner images as of December 3rd, so we prepare
    for that.

    Besides the obvious need to change the runner, we also suppress a
    couple of warnings, because otherwise the build would fail due to
    `-Werror`.
2024-10-28 15:57:16 +01:00
Tim Düsterhus
a1e96620f2
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  curl: Prevent a CurlMultiHandle from holding onto a CurlHandle if `add_handle` fails (#16302)
2024-10-09 09:37:50 +02:00
Tim Düsterhus
e49d732a83
curl: Prevent a CurlMultiHandle from holding onto a CurlHandle if add_handle fails (#16302)
* curl: Prevent a CurlMultiHandle from holding onto a CurlHandle if `add_handle` fails

As a user I expect `curl_multi_add_handle` to not have any effect if it returns
an error and I specifically do not expect that it would be necessary to call
`curl_multi_remove_handle`.

* NEWS
2024-10-09 09:37:13 +02:00
Ilija Tovilo
91c06790de
Switch asan build to Ubuntu 24.04
Closes GH-16065
2024-09-26 15:13:35 +02:00
Christoph M. Becker
8b35b06be5
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/curl: mark certain tests as xfail on curl 8.10.0
2024-09-23 16:14:47 +02:00
Ayesh Karunaratne
0bdc4b8c24
ext/curl: mark certain tests as xfail on curl 8.10.0
Closes GH-16007.
2024-09-23 16:14:09 +02:00
Christoph M. Becker
5961b4ad25
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Mark failing curl test on macOS x64 as xfail
2024-09-23 13:35:55 +02:00
Christoph M. Becker
fc06e0c0d8
Mark failing curl test on macOS x64 as xfail
Exactly these tests are failing on all our macOS x64 CI runners for
about a week.  For now we mark them as xfail, to get back to a green
CI pipeline.

Closes GH-16002.
2024-09-23 13:35:28 +02:00
David Carlier
618edb5e15
Merge branch 'PHP-8.2' into PHP-8.3 2024-08-27 04:57:13 +01:00
David Carlier
cc67220ea3
Fixed GH-15547: curl_multi_wait expects a signed int for timeout.
confusion might come from the previous argument type.
PHP expects ms so we check it fits integer boundaries before the cast.
raising a warning at least for stable branches.

close GH-15548
2024-08-27 04:56:32 +01:00
Christoph M. Becker
fc93300407
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Revert "Skip bug45161.phpt on Windows"
2024-07-18 12:43:35 +02:00
Christoph M. Becker
355baf982e
Revert "Skip bug45161.phpt on Windows"
This reverts commit 4b22c3e3ad.

As quick measure for GH-10753, that test was skipped on Windows.
However, it seems that there are no longer performance issues with
newer cURL versions, so we run that test again on Windows.

Fixes GH-10753.
Closes GH-14998.
2024-07-18 12:42:01 +02:00
David Carlier
383d1b0330
Merge branch 'PHP-8.2' into PHP-8.3 2024-07-18 06:26:22 +01:00
David Carlier
efd00b8ff0
ext/curl: curl_error using curl_easy_strerror if CURLOPT_ERRORBUFFER
did not fill the error buffer.

close GH-14984
2024-07-18 06:25:37 +01:00
Niels Dossche
9e476775e2
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13688: Test curl_basic_008 can fail (#13693)
2024-07-04 18:09:09 +02:00
Niels Dossche
39ed9993f7
Fix GH-13688: Test curl_basic_008 can fail (#13693)
.invalid is a reserved TLD that should never be caught.
2024-07-04 18:07:54 +02:00
Niels Dossche
ae26dc11d1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14307: Test curl_basic_024 fails with curl 8.8.0
2024-05-24 14:42:41 +02:00
Niels Dossche
a2c5b4ec05
Fix GH-14307: Test curl_basic_024 fails with curl 8.8.0
Curl changed the behaviour, from the changelog:
  - lib: make protocol handlers store scheme name lowercase curl/curl@c294f9c

From the docs: "The returned scheme might be upper or lowercase. Do
comparisons case insensitively."

Closes GH-14312.
2024-05-24 14:41:29 +02:00
David Carlier
f2ec6e4806 Merge branch 'PHP-8.2' into PHP-8.3 2024-03-19 22:35:18 +00:00
David Carlier
db063cb771 CI: update freebsd 13 image.
13.2 is going to be EOL.

close GH-13622
2024-03-19 22:34:56 +00:00
Niels Dossche
7e3a6a1b42 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/curl: Fix failing tests due to string changes in libcurl 8.6.0
2024-01-31 21:58:59 +01:00
Ayesh Karunaratne
404803577d ext/curl: Fix failing tests due to string changes in libcurl 8.6.0
Upstream libcurl 8.6.0 contains a change[^1] that caused a test failure.
This fixes it by updating the test's `EXPECTF` to use a regex to account for both string patterns.

[^1]: 45cf4755e7 (diff-a8a54563608f8155973318f4ddb61d7328dab512b8ff2b5cc48cc76979d4204cL1683)

Closes GH-13293.
2024-01-31 21:58:27 +01:00
Niels Dossche
83c8d02602 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix missing error check in curl_multi_init()
2024-01-16 19:36:03 +01:00
divinity76
9814d4a191 Fix missing error check in curl_multi_init()
Closes GH-13157.
2024-01-16 19:35:36 +01:00
Ilija Tovilo
1c39cdd63e
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Skip intermittently failing curl test on macOS
2023-12-08 13:38:48 +01:00
Ilija Tovilo
1b5a159183
[skip ci] Skip intermittently failing curl test on macOS
The test fails with "CURL ERROR: 56". I will create an issue for it shortly.
2023-12-08 13:36:52 +01:00
Ilija Tovilo
2b2d2b04e7
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix EXPECT for bug52820.phpt on newer curl versions
  Fix curl_basic_009.phpt for newer curl versions
2023-08-10 15:52:21 +02:00
Ilija Tovilo
1aae59cf43
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix EXPECT for bug52820.phpt on newer curl versions
  Fix curl_basic_009.phpt for newer curl versions
2023-08-10 15:52:14 +02:00
Ilija Tovilo
0e843c5d82
Fix EXPECT for bug52820.phpt on newer curl versions
New curl versions have a "processing: url" line. The connection number in
"Closing connection" is apparently also dropped.
2023-08-10 15:51:53 +02:00
Ilija Tovilo
3af76b2302
Fix curl_basic_009.phpt for newer curl versions 2023-08-10 15:51:49 +02:00
Niels Dossche
de60872cfd
Add new curl constants from curl until (including) 7.87 (#10459)
Fixes GH-10454
2023-07-17 20:42:39 +02:00
Niels Dossche
7c5a57077a Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix return value of _php_server_push_callback in case of failure
2023-07-09 01:09:56 +02:00
Niels Dossche
e25e14ad95 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix return value of _php_server_push_callback in case of failure
2023-07-09 01:09:50 +02:00
Niels Dossche
dc9adda653 Fix return value of _php_server_push_callback in case of failure
It should return CURL_PUSH_DENY by default instead of CURL_PUSH_OK in
the branch I added, just like the check above.
I forgot to change this after doing tests.
2023-07-09 01:08:34 +02:00
Niels Dossche
46a0d043b5 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix crash when an invalid callback function is passed to CURLMOPT_PUSHFUNCTION
2023-07-08 21:44:26 +02:00
Niels Dossche
d0c824cb7e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix crash when an invalid callback function is passed to CURLMOPT_PUSHFUNCTION
2023-07-08 21:39:17 +02:00
Niels Dossche
3ccd8d7866 Fix crash when an invalid callback function is passed to CURLMOPT_PUSHFUNCTION
Previously this caused a SIGABRT.

Closes GH-11639.
2023-07-08 21:32:10 +02:00
Ilija Tovilo
7e57e108f9
Merge branch 'PHP-8.2'
* PHP-8.2:
  tests(ext-curl): fix HTTP/2 Server Push tests
2023-07-07 10:38:55 +02:00
Ilija Tovilo
30a80b8e41
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  tests(ext-curl): fix HTTP/2 Server Push tests
2023-07-07 10:38:48 +02:00
Kévin Dunglas
47d478806a
tests(ext-curl): fix HTTP/2 Server Push tests
Closes GH-10669
2023-07-07 10:38:26 +02:00
nielsdos
18f2f0a0ab Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11433: Unable to set CURLOPT_ACCEPT_ENCODING to NULL
  Fix "invalid state error" with cloned namespace declarations
  Fix lifetime issue with getAttributeNodeNS()
2023-06-13 17:38:04 +02:00
nielsdos
c160693515 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11433: Unable to set CURLOPT_ACCEPT_ENCODING to NULL
  Fix "invalid state error" with cloned namespace declarations
  Fix lifetime issue with getAttributeNodeNS()
2023-06-13 17:35:16 +02:00