Skip to content

Commit a436da2

Browse files
committed
Avoid dependency on ext-filter
1 parent 8579678 commit a436da2

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)