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

URI Host Mismatch with optional Compliance modes #9343

Merged
merged 9 commits into from Feb 13, 2023

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Feb 12, 2023

This is an alternative PR for #9312. This avoids changing the HttpParser and instead checks for a mismatched host only in the Request.setMetaData method.

joakime and others added 8 commits February 3, 2023 09:16
+ Checks if provided Host authority matches
  an absolute target-uri authority
+ Default is to reject with 400 Bad Request
+ Optional HttpCompliance to disable this
  check.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
+ use example.org (instead of example.net)
+ fix tests that are now failing due
  to enforcement of absolute target-uri
  authority and provided Host header

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This PR fixes the miss-matched host header issue in the Request.setMetaData method. This requires no change to the HttpParser.
A more comprehensive fix can be considered for jetty-12.

Signed-off-by: gregw <gregw@webtide.com>
@gregw
Copy link
Contributor Author

gregw commented Feb 12, 2023

Actually 12 already has this well supported in HttpConnection, other than no compliance mode to allow for a miss-match.

Updates from review

Signed-off-by: gregw <gregw@webtide.com>
@gregw gregw requested a review from sbordet February 13, 2023 11:47
@gregw gregw merged commit 5f25f5b into jetty-10.0.x Feb 13, 2023
@gregw gregw deleted the fix/jetty-10.0.x/uri-host-mismatch-alt branch February 13, 2023 20:43
@joakime joakime changed the title Fix/jetty 10.0.x/uri host mismatch alt URI Host Mismatch with optional Compliance modes Feb 27, 2023
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.

None yet

3 participants