fix(Headers): don't forward secure headers on protocol change#1599
Merged
jimmywarting merged 2 commits intonode-fetch:mainfrom Jul 18, 2022
Merged
Conversation
jimmywarting
approved these changes
Jul 16, 2022
NotMoni
approved these changes
Jul 16, 2022
|
🎉 This PR is included in version 3.2.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
Sorry if this is the wrong place to ask, but since this PR is a fix for a security issue, will (or should) it be backported to the 2.x branch as it was done for #1449? Is this done automatically or should I (or someone else interested in the fix) open another PR targeting the 2.x branch for that? |
Collaborator
|
if you @victal could create a PR to the |
2 tasks
|
Just created #1605 for it, thanks! |
jimmywarting
pushed a commit
that referenced
this pull request
Jul 19, 2022
backport for #1599 to the 2.x branch Co-authored-by: Guilherme Victal <[email protected]>
This was referenced May 20, 2024
This was referenced Oct 1, 2024
This was referenced Oct 2, 2024
This was referenced Oct 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Resolves https://www.huntr.dev/bounties/db31e05b-ff10-4057-81a3-37445bf161cd/ by validating that the URL protocol remains the same when determining whether to send secure headers on a redirect.
This prevents MITM attacks from sniffing secure headers when a redirect downgrades a
https://to ahttp://Changes
Adds an additional check to the redirect
followstep to determine whether to send secure headers or not.Additional information