php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80595 Resetting POSTFIELDS to empty array breaks request
Submitted: 2021-01-06 00:25 UTC Modified: 2021-01-11 16:11 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: dav dot tur19 at gmail dot com Assigned: cmb (profile)
Status: Closed Package: cURL related
PHP Version: 7.4 OS: *
Private report: No CVE-ID: None
 [2021-01-06 00:25 UTC] dav dot tur19 at gmail dot com
Description:
------------
It's the same bug as https://bugs.php.net/bug.php?id=79033, only it occurs on the second request by changing the CURLOPT_POSTFIELDS


Tested on these versions:

It fails on:
Windows 10:
PHP 7.4.7 (cli) (built: Jun  9 2020 13:34:30) ( NTS Visual C++ 2017 x64 )
PHP 7.4.14 (cli) (built: Jan  5 2021 15:12:29) ( ZTS Visual C++ 2017 x64 )
PHP 8.0.0 (cli) (built: Nov 24 2020 22:02:57) ( ZTS Visual C++ 2019 x64 )

Docker linux arm64 (image php:7-fpm):
PHP 7.4.13 (cli) (built: Dec 11 2020 10:10:38) ( NTS )

Works fine on:
WSL (ubuntu on win10):
PHP 7.2.24-0ubuntu0.18.04.7 (cli) (built: Oct  7 2020 15:24:25) ( NTS )



Test script:
---------------
https://pastebin.com/RghzAFCV


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-11 16:11 UTC] cmb@php.net
-Summary: Curl fail with specific url and post +Summary: Resetting POSTFIELDS to empty array breaks request -Status: Open +Status: Verified -Operating System: Win/Linux +Operating System: * -PHP Version: 8.0.0 +PHP Version: 7.4 -Assigned To: +Assigned To: cmb
 [2021-01-11 16:11 UTC] cmb@php.net
> It's the same bug as https://bugs.php.net/bug.php?id=79033, […]

Well, actually this issue is caused by the fix for that bug.  I
just send an email to the cURL mailing list[1] for clarification.

[1] <https://curl.se/mail/lib-2021-01/0066.html>
 [2021-01-15 13:12 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix #80595: Resetting POSTFIELDS to empty array breaks request
On GitHub:  https://github.com/php/php-src/pull/6606
Patch:      https://github.com/php/php-src/pull/6606.patch
 [2021-01-18 10:02 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=38ad37ad435511391e16983794022a8d1e7d6a14
Log: Fix #80595: Resetting POSTFIELDS to empty array breaks request
 [2021-01-18 10:02 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2021-03-04 03:53 UTC] tebogoledwaba at Yandex dot com
The following pull request has been associated:

Patch Name: Remove pcre.h dependency
On GitHub:  https://github.com/php/pecl-web_services-oauth/pull/18
Patch:      https://github.com/php/pecl-web_services-oauth/pull/18.patch
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC