Skip to content

Commit 3f4dced

Browse files
authored
Merge pull request #31 from clue-labs/no-filter
Avoid dependency on `ext-filter`
2 parents 8579678 + a436da2 commit 3f4dced

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SshSocksConnector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function __construct($uri, LoopInterface $loop = null)
7878
\parse_str(parse_url($uri, \PHP_URL_QUERY), $args);
7979
if (isset($args['bind'])) {
8080
$parts = parse_url('tcp://' . $args['bind']);
81-
if (!isset($parts['scheme'], $parts['host'], $parts['port']) || \filter_var(\trim($parts['host'], '[]'), \FILTER_VALIDATE_IP) === false) {
81+
if (!isset($parts['scheme'], $parts['host'], $parts['port']) || @\inet_pton(\trim($parts['host'], '[]')) === false) {
8282
throw new \InvalidArgumentException('Invalid bind address given');
8383
}
8484
$this->bind = $args['bind'];

0 commit comments

Comments
 (0)