elixir-lang/elixir-windows-setup

elixir-websetup does not follow HTTP to HTTPS redirect for ELIXIR|ERLANG_CSV_URL and has limited TLS support

jwtb opened this issue · 8 comments

jwtb commented

Trying to install current elixir with elixir-websetup.exe (per https://elixir-lang.org/install.html) on Win7 host.

Problems noticed:

  1. installer fails with: Error: Downloading http://elixir-lang.org/elixir.csv failed. Setup cannot continue.

ElixirWeb.iss has URLs defined:

#define ELIXIR_CSV_URL 'http://elixir-lang.org/elixir.csv'
#define ERLANG_CSV_URL 'http://elixir-lang.org/erlang.csv'

it looks like the code:
if not idpDownloadFile('{#ELIXIR_CSV_URL}', GlobalElixirCSVFilePath) then ...
fails to follow HTTP redirect from http://elixir-lang.org/... to https://elixir-lang.org/...
No connection is seen to https site (verified with Wireshark)

  1. with the help of local etc/hosts for fake elixir-lang.org and locally hosted *.csv files (just quick hack),
    one can allow elixir-websetup.exe to get CSV files and make some progress.

Unfortunately it next fails to download elixir release from https://github.com/elixir-lang/elixir/releases/...
Wireshark shows failed TLS handshake; it looks like inno-download-plugin used by installer supports TLSv1.0 and SSLv3.0 only and github wants TLSv1.2 (https://www.thesslstore.com/blog/deprecation-tls-1-0-1-1-underway/)

Limited TLS versions support will affect https://elixir-lang.org connectivity when HTTP redirect is fixed (problem 1 above)

Warning: I have no experience with Inno Setup code and I don't know inno-download-plugin - it's just cursory analyses of failed installation.

Thanks @jwtb! I have tried this on a Windows VM and the installer worked fine, so there are definitely external factors at play. If somebody could send a pull request, it would definitely be appreciated.

@josevalim Windows 7 or 10? Also sometimes the VMs provided by Microsoft are weird and work properly compared to commercial versions of windows.

Windows 10. If there is a Windows 7 VM I could try it on please let me know and I will gladly do it.

@josevalim I can give you remote access to one? Teamviewer, rdp, or vnc choose your poison.

@vans163 that would be nice although I am afraid that, after I reproduce it, there isn't much I can do to move forward. I can try though.

Did you try downloading a new version of the inno-download-plugin and rebuilding the installer to see if it fixes the issue? If it is a certificate issue, then it should be a matter of bundling the most recent SSL certificates and ciphers.

jwtb commented

Thanks to @josevalim, @vans163 discussion I decided to look at the issue again. It forced me to think a bit. I should perform the test with another Windows instance - was too lazy, my fault.

It took me some time to google/read inno-download-plugin code. Long story short:

The best part for regular users is that we may change Advanced settings in IE Internet Options, no messing in the registry:

  • enable TLSv1.2 usage
  • disable "warn if changing between secure and non secure mode"
    (my native lang version suggests it applies to HTTPS->HTTP redirection only; as we see, it affects both directions)

After the changes elixir-websetup.exe works again. As happens the solution is easy once we know it.
I guess my 'bad' IE settings were related to Windows installation history/patches/etc. I'm not using IE.

I assume the issue may be closed, but it would be good to see fix reports from other affected users.

Thank you so much @jwtb for the follow up! We will leave it open as it may help others!

With Version 2.2 we now use the HTTPS URL directly, which should address the redirect issue. This is a new release in quite some time and since then, IDP has been dormant and more importantly Inno Setup now natively supports downloading files. The documentation claims it can traverse proxies. So at some point I'll update our implementation to use the now download support for a v3.0 release, ideally before the TLS 1.1 deprecation.