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

Reject listening on hostnames and document valid URIs #66

Merged
merged 2 commits into from
Feb 5, 2017

Conversation

clue
Copy link
Member

@clue clue commented Jan 27, 2017

Listening on a hostname such as example.com or localhost is a blocking operation. This simple PR enforces the host to consists of an IP address.

Fixes / closes #7
Refs / builds on top of #65

README.md Outdated
```

In order to change the host the socket is listening on, you can provide an IP
addres through the first parameter provided to the constructor, optionally
Copy link
Member

Choose a reason for hiding this comment

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

missing s on address

src/Server.php Outdated
* provided to the constructor.
* As above, the `$uri` parameter can consist of only a port, in which case the
* server will default to listening on the localhost address `127.0.0.1` and thus
* it will not be reachable from outside of this system.
Copy link
Member

Choose a reason for hiding this comment

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

src/Server.php Outdated
* ```
*
* In order to change the host the socket is listening on, you can provide an IP
* addres through the first parameter provided to the constructor, optionally
Copy link
Member

Choose a reason for hiding this comment

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

missing s on address

README.md Outdated
provided to the constructor:
As above, the `$uri` parameter can consist of only a port, in which case the
server will default to listening on the localhost address `127.0.0.1` and thus
it will not be reachable from outside of this system.
Copy link
Member

Choose a reason for hiding this comment

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

superfluous it (not sure)? Maybe: and thus will not be reachable...

@clue
Copy link
Member Author

clue commented Feb 5, 2017

Updated to fix typos :shipit:

@clue clue added this to the v0.5.0 milestone Feb 5, 2017
@clue clue merged commit c94c3e5 into reactphp:master Feb 5, 2017
@clue clue deleted the hostname branch February 5, 2017 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server::listen() is blocking if given a hostname
3 participants