From 34768a8cea6263cd13b0505db1634c295b46af33 Mon Sep 17 00:00:00 2001 From: Michele Romano <33063403+Mik317@users.noreply.github.com> Date: Tue, 1 Sep 2020 12:25:38 +0200 Subject: [PATCH] [FIX] MITM using "https" links --- install.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install.js b/install.js index 3d64a59..2ff3a93 100644 --- a/install.js +++ b/install.js @@ -1,17 +1,17 @@ "use strict"; var fs = require('fs'); -var http = require('http'); +var https = require('https'); var path = require('path'); var url = require('url'); var util = require('util'); var AdmZip = require('adm-zip'); -// TODO: use http://selenium-release.storage.googleapis.com/index.html to find latest version number -var jarURL = 'http://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar'; +// TODO: use https://selenium-release.storage.googleapis.com/index.html to find latest version number +var jarURL = 'https://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar'; -// TODO: use contents of http://chromedriver.storage.googleapis.com/LATEST_RELEASE to determine version to download -var chromeDriverURL = 'http://chromedriver.storage.googleapis.com/2.14/chromedriver_'; +// TODO: use contents of https://chromedriver.storage.googleapis.com/LATEST_RELEASE to determine version to download +var chromeDriverURL = 'https://chromedriver.storage.googleapis.com/2.14/chromedriver_'; if (process.platform === 'linux' && process.arch === 'x64') { chromeDriverURL += 'linux64.zip'; @@ -84,7 +84,7 @@ function downloadFile(fileURL, callback) { var writePath = filePath + '-download-' + Date.now(); var outFile = fs.openSync(writePath, 'w'); - var client = http.get(requestOptions, function(response) { + var client = https.get(requestOptions, function(response) { var status = response.statusCode; console.log('Receiving...'); @@ -109,7 +109,7 @@ function downloadFile(fileURL, callback) { } else { client.abort(); console.error('Error requesting archive'); - callback(new Error('Error with http request: ' + util.inspect(response.headers))); + callback(new Error('Error with https request: ' + util.inspect(response.headers))); } });