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

0 is a valid port number #22

Closed
nyamsprod opened this issue Feb 12, 2020 · 0 comments
Closed

0 is a valid port number #22

nyamsprod opened this issue Feb 12, 2020 · 0 comments

Comments

@nyamsprod
Copy link

@nyamsprod nyamsprod commented Feb 12, 2020

ssh/src/Ssh.php

Line 114 in daace80

if ($this->port) {

The following code will fail if I choose 0 as a port number because 0 is a valid port number You should improve port validation in this case and enable any positive number and 0 and update the check to be if (null !== $this->port) instead.

mazedlx added a commit to mazedlx/ssh that referenced this issue Feb 12, 2020
lancepioch added a commit to lancepioch/ssh that referenced this issue Feb 12, 2020
freekmurze added a commit that referenced this issue Feb 13, 2020
Add test and fix conditional for #22.
@freekmurze freekmurze closed this Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.