aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2009-07-22 02:57:36 +0000
committerAndreas Fischer <bantu@phpbb.com>2009-07-22 02:57:36 +0000
commit2a84b76f3062a87c0069da1db2bdca83509882b1 (patch)
tree7f32b3d2f0701698d37937a29ce66e5ae0e525dc /phpBB
parent81e67fbef141ea47249b5f9d1a4e1cb34263b248 (diff)
downloadforums-2a84b76f3062a87c0069da1db2bdca83509882b1.tar
forums-2a84b76f3062a87c0069da1db2bdca83509882b1.tar.gz
forums-2a84b76f3062a87c0069da1db2bdca83509882b1.tar.bz2
forums-2a84b76f3062a87c0069da1db2bdca83509882b1.tar.xz
forums-2a84b76f3062a87c0069da1db2bdca83509882b1.zip
Fix two potential problems with the ftp_fsock class.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9821 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_transfer.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index c1211eda52..7c5cd329a4 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -737,7 +737,12 @@ class ftp_fsock extends transfer
$list = array();
while (!@feof($this->data_connection))
{
- $list[] = preg_replace('#[\r\n]#', '', @fgets($this->data_connection, 512));
+ $filename = preg_replace('#[\r\n]#', '', @fgets($this->data_connection, 512));
+
+ if ($filename !== '')
+ {
+ $list[] = $filename;
+ }
}
$this->_close_data_connection();
@@ -840,7 +845,7 @@ class ftp_fsock extends transfer
$result = @fgets($this->connection, 512);
$response .= $result;
}
- while (substr($response, 3, 1) != ' ');
+ while (substr($result, 3, 1) !== ' ');
if (!preg_match('#^[123]#', $response))
{