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

fix!: Fix Host Allow List Handler #985

Merged
merged 4 commits into from
Apr 8, 2024

Conversation

usmansaleem
Copy link
Contributor

PR Description

fix!: Fix Host Allow List Handler
--handle case of empty Host header and its value

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Testing

  • I thought about testing these changes in a realistic/non-local environment.

 --handle case of empty Host header and its value
@usmansaleem usmansaleem requested review from jframe and siladu April 3, 2024 07:03
@usmansaleem usmansaleem mentioned this pull request Apr 5, 2024
3 tasks
}
return Optional.ofNullable(Iterables.get(splitHostHeader, 0));
final HostAndPort hostAndPort = event.request().authority();
return Optional.ofNullable(hostAndPort).map(HostAndPort::host);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice improvement

@usmansaleem usmansaleem requested a review from jframe April 5, 2024 06:41
@usmansaleem usmansaleem enabled auto-merge (squash) April 8, 2024 02:07
@usmansaleem usmansaleem merged commit 165c715 into Consensys:master Apr 8, 2024
6 of 7 checks passed
@usmansaleem usmansaleem deleted the null_host_header branch April 8, 2024 03:43
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.

2 participants