-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Conversation
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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...
Updated to fix typos |
Listening on a hostname such as
example.com
orlocalhost
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