From 23b0d8b9fc1202500603494675802b7b048ead70 Mon Sep 17 00:00:00 2001 From: robmoss2k <15984835+robmoss2k@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:15:41 +0000 Subject: [PATCH 1/3] Allow insecure redirects in download request for latest releases --- automatic/codeblocks/update.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automatic/codeblocks/update.ps1 b/automatic/codeblocks/update.ps1 index 6fa5b4e73b6..82fa77df389 100644 --- a/automatic/codeblocks/update.ps1 +++ b/automatic/codeblocks/update.ps1 @@ -22,7 +22,7 @@ function global:au_SearchReplace { } function global:au_GetLatest { - $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases + $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases -AllowInsecureRedirect $re = 'sourceforge.*mingw-setup\.exe$' $url = $download_page.links | ? href -match $re | select -first 1 -expand href From 709bdaecef354b1116288fd505c856ca83e0c44a Mon Sep 17 00:00:00 2001 From: robmoss2k <15984835+robmoss2k@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:16:38 +0000 Subject: [PATCH 2/3] fix: add trailing slash to Code::Blocks releases URL --- automatic/codeblocks/update.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automatic/codeblocks/update.ps1 b/automatic/codeblocks/update.ps1 index 6fa5b4e73b6..291edc135b6 100644 --- a/automatic/codeblocks/update.ps1 +++ b/automatic/codeblocks/update.ps1 @@ -1,6 +1,6 @@ Import-Module Chocolatey-AU -$releases = 'https://www.codeblocks.org/downloads/binaries' +$releases = 'https://www.codeblocks.org/downloads/binaries/' function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix -FileNameSkip 1 } From bf394e0d378415673a440769438c39127c9fafe7 Mon Sep 17 00:00:00 2001 From: robmoss2k <15984835+robmoss2k@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:37:02 +0000 Subject: [PATCH 3/3] fix: remove AllowInsecureRedirect from download request in Code::Blocks update script --- automatic/codeblocks/update.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automatic/codeblocks/update.ps1 b/automatic/codeblocks/update.ps1 index 8f37ba3b333..291edc135b6 100644 --- a/automatic/codeblocks/update.ps1 +++ b/automatic/codeblocks/update.ps1 @@ -22,7 +22,7 @@ function global:au_SearchReplace { } function global:au_GetLatest { - $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases -AllowInsecureRedirect + $download_page = Invoke-WebRequest -UseBasicParsing -Uri $releases $re = 'sourceforge.*mingw-setup\.exe$' $url = $download_page.links | ? href -match $re | select -first 1 -expand href