Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

relax restrictions on host name validation #4618

Conversation

wanderingbort
Copy link
Contributor

  • include the resolved and raw ports in the cleared host list
  • allow an incoming connection to use the host of the IP:PORT it is actually connected to at a socket level

- include the resolved and raw ports in the cleared host list
- allow an incoming connection to use the host of the IP:PORT it is actually connected to at a socket level
const auto& local_endpoint = con->get_socket().lowest_layer().local_endpoint();
auto local_socket_host = local_endpoint.address().to_string();
auto port = local_endpoint.port();
if (!(is_secure && port == 443) || (!is_secure && port == 80)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to restrict this to 443 for https and 80 for http? Seems like you could enable no matter what local_endpoint port is used.

@wanderingbort wanderingbort merged commit 749e0fe into EOSIO:release/1.0.x Jul 13, 2018
@wanderingbort wanderingbort deleted the feature/less-strict-host-checking branch July 13, 2018 02:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants