Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Allowed Hosts to HTTPSRedirectMiddleware #29

Merged
merged 7 commits into from
May 18, 2023
Merged

Add Allowed Hosts to HTTPSRedirectMiddleware #29

merged 7 commits into from
May 18, 2023

Conversation

0xTim
Copy link
Member

@0xTim 0xTim commented May 18, 2023

Adds a new parameter to HTTPSRedirectMiddleware to allow users to set allowed hosts that can be redirected to. Prevents attackers poisoning the host header to force redirects to their domains.

Resolves #28

@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (732edf8) 100.00% compared to head (40d9968) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #29   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          275       279    +4     
=========================================
+ Hits           275       279    +4     
Impacted Files Coverage Δ
...aders/Configurations/HTTPSRedirectMiddleware.swift 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@0xTim 0xTim merged commit e1369d2 into main May 18, 2023
4 checks passed
@0xTim 0xTim deleted the allowed-hosts branch May 18, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Host poisoning issue in HTTPSRedirectMiddleware
1 participant