Skip to content

Commit

Permalink
Merge pull request #31 from clue-labs/no-filter
Browse files Browse the repository at this point in the history
Avoid dependency on `ext-filter`
  • Loading branch information
SimonFrings authored Dec 6, 2021
2 parents 8579678 + a436da2 commit 3f4dced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SshSocksConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct($uri, LoopInterface $loop = null)
\parse_str(parse_url($uri, \PHP_URL_QUERY), $args);
if (isset($args['bind'])) {
$parts = parse_url('tcp://' . $args['bind']);
if (!isset($parts['scheme'], $parts['host'], $parts['port']) || \filter_var(\trim($parts['host'], '[]'), \FILTER_VALIDATE_IP) === false) {
if (!isset($parts['scheme'], $parts['host'], $parts['port']) || @\inet_pton(\trim($parts['host'], '[]')) === false) {
throw new \InvalidArgumentException('Invalid bind address given');
}
$this->bind = $args['bind'];
Expand Down

0 comments on commit 3f4dced

Please sign in to comment.