From 0ab032d47be944d411a50e0ed3c001ce10c361ef Mon Sep 17 00:00:00 2001 From: Andrzej Demski <75534654+AndrewDemski-ad-gmail-com@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:32:40 +0200 Subject: [PATCH] Update Test-ModsPath.ps1 Following the results of megaliner scan, we need to remove the hardcode of security protocols --- Sources/WAU/Winget-AutoUpdate/functions/Test-ModsPath.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/WAU/Winget-AutoUpdate/functions/Test-ModsPath.ps1 b/Sources/WAU/Winget-AutoUpdate/functions/Test-ModsPath.ps1 index 9f468b1..62ffe86 100644 --- a/Sources/WAU/Winget-AutoUpdate/functions/Test-ModsPath.ps1 +++ b/Sources/WAU/Winget-AutoUpdate/functions/Test-ModsPath.ps1 @@ -12,8 +12,9 @@ function Test-ModsPath ($ModsPath, $WingetUpdatePath, $AzureBlobSASURL) { # If path is URL if ($ExternalMods -like "http*") { - # enable TLS 1.2 and TLS 1.1 protocols - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Tls11 + # ADD TLS 1.2 and TLS 1.1 to list of currently used protocols + [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 + [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls11 #Get Index of $ExternalMods (or index page with href listing of all the Mods) try { $WebResponse = Invoke-WebRequest -Uri $ExternalMods -UseBasicParsing