Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

fix(install): Limit HTTP redirects

Open gitolicious opened this issue 6 months ago • 0 comments

Description

When a misconfigured download server responds with invalid/infinite redirects, Scoop follows them and gets stuck in a loop. This PR limits the redirects to 20.

Motivation and Context

Closes #5757

How Has This Been Tested?

  1. Create manifest https://www.screenpresso.com/binaries/releases/stable/dotnet47/Screenpresso.exe as the url.
  2. Run scoop update screenpresso with original install.ps1 -> infinite loops are being followed.
  3. Run scoop update screenpresso with install.ps1 from this PR -> error is thrown after 20 redirects.

Checklist:

  • [x] I have read the Contributing Guide.
  • [x] I have ensured that I am targeting the develop branch.
  • [n/a] I have updated the documentation accordingly.
  • [n/a] I have updated the tests accordingly.
  • [x] I have added an entry in the CHANGELOG.

gitolicious avatar Dec 14 '23 08:12 gitolicious