2020-07-16 16:28:01 |
Stephen Rees |
bug |
|
|
added bug |
2020-07-17 05:37:59 |
Christian Ehrhardt |
php7.4 (Ubuntu): status |
New |
Triaged |
|
2020-07-17 05:38:08 |
Christian Ehrhardt |
php7.4 (Ubuntu): assignee |
|
Bryce Harrington (bryce) |
|
2020-07-20 19:42:30 |
Bryce Harrington |
tags |
|
server-next |
|
2020-07-20 19:42:36 |
Bryce Harrington |
php7.4 (Ubuntu): importance |
Undecided |
Medium |
|
2020-07-20 21:45:44 |
Bryce Harrington |
attachment added |
|
fc8b3ab7cbb4f5e77584babeaf25b9bf16f524cd.patch https://bugs.launchpad.net/ubuntu/+source/php7.4/+bug/1887826/+attachment/5394460/+files/fc8b3ab7cbb4f5e77584babeaf25b9bf16f524cd.patch |
|
2020-07-20 21:47:39 |
Bryce Harrington |
php7.4 (Ubuntu): status |
Triaged |
Incomplete |
|
2020-07-20 21:48:56 |
Bryce Harrington |
php7.4 (Ubuntu): status |
Incomplete |
Triaged |
|
2020-07-20 21:49:04 |
Bryce Harrington |
nominated for series |
|
Ubuntu Focal |
|
2020-07-20 21:49:04 |
Bryce Harrington |
bug task added |
|
php7.4 (Ubuntu Focal) |
|
2020-07-20 21:49:10 |
Bryce Harrington |
php7.4 (Ubuntu Focal): status |
New |
Incomplete |
|
2020-07-20 22:01:14 |
Simon Déziel |
bug |
|
|
added subscriber Simon Déziel |
2020-07-21 00:25:44 |
Ubuntu Foundations Team Bug Bot |
tags |
server-next |
patch server-next |
|
2020-07-31 16:39:26 |
Rafael David Tinoco |
description |
See https://bugs.php.net/bug.php?id=79013 for this exact issue.
Upgrading Ubuntu's supported PHP version to 7.4.4 *should* fix the issue, or backporting the patch in the link I included.
PHP7.4.3 has an issue with cURL where it is defaulting to chunked mode when transferring a file via POST. Setting the HTTP version does not impact it. For third-party servers that don't support chunked but expect a content-length, there is no way to make it work.
package: php7.4 (7.4.3-4ubuntu2.2)(possibly related, libapache2-mod-php7.4d, php7.4-curl)
release: Ubuntu 20.04 LTS
Expect: PHP-cURL to POST HTTP1.1 multipart/form-data with automatically generated Content-Length and empty Transfer-Encoding headers.
Actual: PHP-cURL POSTS HTTP1.1 multipart/form-data with Transfer-Encoding: chunked and empty Content-Length headers. |
[Impact]
* PHP7.4.3 has an issue with cURL where it is defaulting to chunked mode when transferring a file via POST. Setting the HTTP version does not impact it. For third-party servers that don't support chunked but expect a content-length, there is no way to make it work.
* See https://bugs.php.net/bug.php?id=79013 for this exact issue.
[Test Case]
* Here is a sample similar to what I'm doing, with url/token/file removed:
-----------------
<?php
$url = '';
$access_token = '';
$file = '';
$ch = curl_init($url);
$options = [
CURLOPT_CUSTOMREQUEST => 'POST,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $access_token,
'Content-Type: multipart/form-data',
],
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_POSTREDIR => 3,
CURLINFO_HEADER_OUT => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,//this has no effect
];
$file = curl_file_create(realpath($file), null, basename($file));
$data = ['file' => $file, 'name' => basename($file)];
$options[CURLOPT_POSTFIELDS] = $data;
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
$curl_info = curl_getinfo($ch);
$curl_error = curl_error($ch);
curl_close($ch);
?>
-----------------
This works in Ubuntu 18, but not Ubuntu 20.
[Regression Potential]
* TBD
[Other Info]
Upgrading Ubuntu's supported PHP version to 7.4.4 *should* fix the issue, or backporting the patch in the link I included.
package: php7.4 (7.4.3-4ubuntu2.2)(possibly related, libapache2-mod-php7.4d, php7.4-curl)
release: Ubuntu 20.04 LTS
Expect: PHP-cURL to POST HTTP1.1 multipart/form-data with automatically generated Content-Length and empty Transfer-Encoding headers.
Actual: PHP-cURL POSTS HTTP1.1 multipart/form-data with Transfer-Encoding: chunked and empty Content-Length headers. |
|
2020-07-31 16:39:37 |
Rafael David Tinoco |
php7.4 (Ubuntu Focal): status |
Incomplete |
Triaged |
|
2020-07-31 16:39:50 |
Rafael David Tinoco |
bug |
|
|
added subscriber Ubuntu Server |
2020-08-17 02:20:00 |
Launchpad Janitor |
php7.4 (Ubuntu): status |
Triaged |
Fix Released |
|
2020-09-03 19:49:38 |
Bryce Harrington |
php7.4 (Ubuntu Focal): importance |
Undecided |
Medium |
|
2020-09-03 19:49:40 |
Bryce Harrington |
php7.4 (Ubuntu Focal): assignee |
|
Bryce Harrington (bryce) |
|
2020-09-03 20:03:23 |
Bryce Harrington |
bug watch added |
|
http://bugs.php.net/bug.php?id=79013 |
|
2020-09-03 20:03:23 |
Bryce Harrington |
bug task added |
|
php |
|
2020-09-05 03:21:49 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~bryce/ubuntu/+source/php7.4/+git/php7.4/+merge/390343 |
|
2020-09-08 16:54:30 |
Bryce Harrington |
description |
[Impact]
* PHP7.4.3 has an issue with cURL where it is defaulting to chunked mode when transferring a file via POST. Setting the HTTP version does not impact it. For third-party servers that don't support chunked but expect a content-length, there is no way to make it work.
* See https://bugs.php.net/bug.php?id=79013 for this exact issue.
[Test Case]
* Here is a sample similar to what I'm doing, with url/token/file removed:
-----------------
<?php
$url = '';
$access_token = '';
$file = '';
$ch = curl_init($url);
$options = [
CURLOPT_CUSTOMREQUEST => 'POST,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $access_token,
'Content-Type: multipart/form-data',
],
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_POSTREDIR => 3,
CURLINFO_HEADER_OUT => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,//this has no effect
];
$file = curl_file_create(realpath($file), null, basename($file));
$data = ['file' => $file, 'name' => basename($file)];
$options[CURLOPT_POSTFIELDS] = $data;
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
$curl_info = curl_getinfo($ch);
$curl_error = curl_error($ch);
curl_close($ch);
?>
-----------------
This works in Ubuntu 18, but not Ubuntu 20.
[Regression Potential]
* TBD
[Other Info]
Upgrading Ubuntu's supported PHP version to 7.4.4 *should* fix the issue, or backporting the patch in the link I included.
package: php7.4 (7.4.3-4ubuntu2.2)(possibly related, libapache2-mod-php7.4d, php7.4-curl)
release: Ubuntu 20.04 LTS
Expect: PHP-cURL to POST HTTP1.1 multipart/form-data with automatically generated Content-Length and empty Transfer-Encoding headers.
Actual: PHP-cURL POSTS HTTP1.1 multipart/form-data with Transfer-Encoding: chunked and empty Content-Length headers. |
[Impact]
* PHP7.4.3 has an issue with cURL where it is defaulting to chunked mode when transferring a file via POST. Setting the HTTP version does not impact it. For third-party servers that don't support chunked but expect a content-length, there is no way to make it work.
* See https://bugs.php.net/bug.php?id=79013 for this exact issue.
[Test Case]
* Here is a sample similar to what I'm doing, with url/token/file removed:
-----------------
<?php
$url = '';
$access_token = '';
$file = '';
$ch = curl_init($url);
$options = [
CURLOPT_CUSTOMREQUEST => 'POST,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $access_token,
'Content-Type: multipart/form-data',
],
CURLOPT_SSL_VERIFYHOST => 2,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_POSTREDIR => 3,
CURLINFO_HEADER_OUT => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,//this has no effect
];
$file = curl_file_create(realpath($file), null, basename($file));
$data = ['file' => $file, 'name' => basename($file)];
$options[CURLOPT_POSTFIELDS] = $data;
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
$curl_info = curl_getinfo($ch);
$curl_error = curl_error($ch);
curl_close($ch);
?>
-----------------
This works in Ubuntu 18, but not Ubuntu 20.
[Regression Potential]
The fix itself for this bug is reasonably straightforward, but it builds on an earlier patch that involved a fair bit of refactoring code.
This includes code which detects and adapts to libcurl > 7.56.0, so behavioral regressions narrowable to the newer versions of libcurl could potentially indicate a regression caused by this SRU.
[Other Info]
Upgrading Ubuntu's supported PHP version to 7.4.4 *should* fix the issue, or backporting the patch in the link I included.
package: php7.4 (7.4.3-4ubuntu2.2)(possibly related, libapache2-mod-php7.4d, php7.4-curl)
release: Ubuntu 20.04 LTS
Expect: PHP-cURL to POST HTTP1.1 multipart/form-data with automatically generated Content-Length and empty Transfer-Encoding headers.
Actual: PHP-cURL POSTS HTTP1.1 multipart/form-data with Transfer-Encoding: chunked and empty Content-Length headers. |
|
2020-09-15 20:14:49 |
Brian Murray |
php7.4 (Ubuntu Focal): status |
Triaged |
Fix Committed |
|
2020-09-15 20:14:51 |
Brian Murray |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2020-09-15 20:14:53 |
Brian Murray |
bug |
|
|
added subscriber SRU Verification |
2020-09-15 20:14:58 |
Brian Murray |
tags |
patch server-next |
patch server-next verification-needed verification-needed-focal |
|
2020-09-30 21:30:48 |
Stephen Rees |
tags |
patch server-next verification-needed verification-needed-focal |
patch server-next verification-done-focal verification-needed |
|
2020-10-14 17:58:59 |
Launchpad Janitor |
php7.4 (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2020-10-14 17:58:59 |
Launchpad Janitor |
cve linked |
|
2020-7069 |
|
2020-10-14 17:58:59 |
Launchpad Janitor |
cve linked |
|
2020-7070 |
|