[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#913740: fetch-url does not use --no-check-certificate on HTTP to HTTPS redirects



On 2018-11-14 15:48, Mauricio Oliveira wrote:
In fetch-url the --no-check-certificate option is conditioned to HTTPS.
In case of HTTP to HTTPS redirect, that option is not enabled, and may
cause fetch-url to fail if the certificate cannot be verified.

Since that option/functionality must be explicitly requested with the
debian-installer/allow_unauthenticated_ssl preseed option (i.e., user
is aware of SSL/HTTPS context and agrees w/ non-verified certificates)
we can just check for this in the HTTP protocol too, and assume HTTPS
may potentially be used, as the user specified this option.

An alternative/obvious solution in the _user_ side is to specify HTTPS
URLs upfront, but there are cases when an user does not know for sure
whether the server uses/supports that, or the server might change its
behavior and start HTTP to HTTPS redirect after URLs have spread over
(e.g., scripts and infrastructure) - thus a fix in the installer side
is a simpler and more complete approach.

Why do we need to build out this insecure option more rather than the target having supported SSL certificates (now that Let's Encrypt and friends exist)? I will note that it's also possible to copy additional root certificates into the initrd pre-install. (At least it used to work before HTTPS was generally available.)

Kind regards and thanks
Philipp Kern


Reply to: