http:Fix Host header in proxied https connections
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Debian) |
Fix Released
|
Unknown
|
|||
apt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Julian Andres Klode | ||
Disco |
Fix Released
|
Medium
|
Julian Andres Klode |
Bug Description
[Impact]
Currently CONNECT requests use the name of the proxy as Host value, instead of the origin server's name.
According to RFC 2616 "The Host field value MUST represent the naming authority of the origin server or gateway given by the original URL."
The current implementation causes problems with some proxy vendors. This
commit[0] fixes this.
[Test Case]
Here's one reproducer an impacted user brought to my attention:
# /etc/environment
http_proxy="http://
https_proxy="http://
To support application development activities in-house, I had to configure Azure CLI APT repository following the instructions from "https:/
$ sudo apt-get update
$ sudo apt-get install curl apt-transport-https lsb-release gnupg
$ curl -sL https:/
$ gpg --dearmor | \
$ sudo tee /etc/apt/
$ AZ_REPO=
$ echo "deb [arch=amd64] https:/
$ sudo tee /etc/apt/
$ sudo apt update
In the final "apt update" command, APT respects system-wide network proxy variables and successfully fetched Canonical repository data over HTTP.
However, it was unable to fetch the newly added Microsoft packages repository served via HTTPS.
By using Wireshark to examine the HTTPS request made by APT, the request body reveals as:
CONNECT packages.
Host: internal:8080\r\n
User-Agent: Debian APT-HTTP/1.3 (1.6.11)\r\n
...
...
There also is an automated test case in the package that runs as part of autopkgtest that tests a scenario like this, see the commit.
[Regression Potential]
* Fix already in debian, and Eoan
* Has been reviewed/approved by juliank
* A test package (pre-sru) has been provided to an impacted user, and he confirms it solves the situation.
[Other Info]
# salsa
$ git describe --contains 86d4d98060f36c7
1.9.0~8
# rmadison apt
=> apt | 1.6.11 | bionic-updates | source, amd64, arm64, armhf, i386, ppc64el, s390x
=> apt | 1.8.1 | disco-updates | source, amd64, arm64, armhf, i386, ppc64el, s390x
apt | 1.9.1 | eoan | source, amd64, arm64, armhf, i386, ppc64el, s390x
Changed in apt (Ubuntu): | |
status: | New → Fix Released |
tags: | added: sts |
Changed in apt (Ubuntu Bionic): | |
assignee: | nobody → Eric Desrochers (slashd) |
Changed in apt (Ubuntu Disco): | |
assignee: | nobody → Eric Desrochers (slashd) |
status: | New → In Progress |
Changed in apt (Ubuntu Bionic): | |
status: | New → In Progress |
description: | updated |
description: | updated |
Changed in apt (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in apt (Ubuntu Disco): | |
importance: | Undecided → Medium |
Changed in apt (Ubuntu Bionic): | |
assignee: | Eric Desrochers (slashd) → nobody |
assignee: | nobody → Julian Andres Klode (juliank) |
Changed in apt (Ubuntu Disco): | |
assignee: | Eric Desrochers (slashd) → Julian Andres Klode (juliank) |
Changed in apt (Ubuntu): | |
importance: | Undecided → Medium |
Changed in apt (Debian): | |
status: | Unknown → Fix Released |
Uploaded apt 1.8.3 to disco (this is a sync (*) from Debian unstable, and also includes some other bug fixes from 1.8.2 which I forgot to sync earlier)
(*) uploaded with --no-lp so we get a diff for sru-review