aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_transfer.php
diff options
context:
space:
mode:
authorrubencm <rubencm@gmail.com>2019-10-24 20:03:32 +0000
committerrubencm <rubencm@gmail.com>2019-11-01 10:30:41 +0000
commitb6a99e7dcad10836cd2277ba2bd9a6c19afe90f1 (patch)
tree7e2292e84aa12d68424a0f945fd2d1330bc0e467 /phpBB/includes/functions_transfer.php
parentf09f5bc51c15eef526374105d6443270dc1172bf (diff)
downloadforums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.tar
forums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.tar.gz
forums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.tar.bz2
forums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.tar.xz
forums-b6a99e7dcad10836cd2277ba2bd9a6c19afe90f1.zip
[ticket/16188] Remove some legacy code and fix bug
PHPBB3-16189
Diffstat (limited to 'phpBB/includes/functions_transfer.php')
-rw-r--r--phpBB/includes/functions_transfer.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index 7427b89917..f0070b4b1e 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -810,7 +810,7 @@ class ftp_fsock extends transfer
$server_ip = substr($socket_name, 0, strrpos($socket_name, ':'));
}
- if (!isset($server_ip) || preg_match(get_preg_expression('ipv4'), $server_ip))
+ if (isset($server_ip) && filter_var($server_ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) // ipv4
{
// Passive mode
$this->_send_command('PASV', '', false);
@@ -831,7 +831,7 @@ class ftp_fsock extends transfer
$server_ip = $temp[0] . '.' . $temp[1] . '.' . $temp[2] . '.' . $temp[3];
$server_port = $temp[4] * 256 + $temp[5];
}
- else
+ else // ipv6
{
// Extended Passive Mode - RFC2428
$this->_send_command('EPSV', '', false);