We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8579678 + a436da2 commit 3f4dcedCopy full SHA for 3f4dced
src/SshSocksConnector.php
@@ -78,7 +78,7 @@ public function __construct($uri, LoopInterface $loop = null)
78
\parse_str(parse_url($uri, \PHP_URL_QUERY), $args);
79
if (isset($args['bind'])) {
80
$parts = parse_url('tcp://' . $args['bind']);
81
- 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) {
82
throw new \InvalidArgumentException('Invalid bind address given');
83
}
84
$this->bind = $args['bind'];
0 commit comments