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

Trusted hosts #474

Merged
merged 2 commits into from
Dec 1, 2024
Merged

Trusted hosts #474

merged 2 commits into from
Dec 1, 2024

Conversation

Blacksmoke16
Copy link
Member

Context

Many different kinds of attacks have been discovered relying on inconsistencies in handling the Host header by various software. This PR provides a simple way to guard against these types of attacks by allowing users to whitelist the hostnames they wish to handle requests from.

When configured, any request with a hostname that doesn't match at least one of the provided regexes, will return a 400 response.

Changelog

  • Add a new trusted_hosts bundle schema property to allow setting trusted hosts

Before merging, remember to add the athena-framework/athena prefix to the PR number in the PR title

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Flag Coverage Δ
compiled 8.17% <15.38%> (+0.01%) ⬆️
unit 92.69% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
clock 98.18% <ø> (ø)
console 92.61% <ø> (ø)
dependency_injection 64.28% <ø> (ø)
dotenv 96.80% <ø> (ø)
event_dispatcher 82.75% <ø> (ø)
framework 93.95% <100.00%> (+0.03%) ⬆️
image_size 95.03% <ø> (ø)
mercure 93.37% <ø> (ø)
negotiation 97.69% <ø> (ø)
routing 92.96% <ø> (ø)
serializer 87.23% <ø> (ø)
spec 93.54% <ø> (ø)
validator 92.37% <ø> (ø)

📢 Thoughts on this report? Let us know!

@Blacksmoke16 Blacksmoke16 merged commit 9a21585 into master Dec 1, 2024
14 checks passed
@Blacksmoke16 Blacksmoke16 deleted the trusted-hosts branch December 1, 2024 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant