mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 07:35:29 +02:00
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
This commit is contained in:
parent
81e67fbef1
commit
2a84b76f30
@ -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))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user