diff options
author | Andreas Fischer <bantu@phpbb.com> | 2009-07-22 01:01:55 +0000 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2009-07-22 01:01:55 +0000 |
commit | 2bb2e4a43b30bd3a686106865c84786de42d50e8 (patch) | |
tree | 2041f0d20a554e1dde568f6afb3b1a05f33c1817 /phpBB/includes/functions_transfer.php | |
parent | 8e8c40bc75f1394dfcb9fd772858069388b86b06 (diff) | |
download | forums-2bb2e4a43b30bd3a686106865c84786de42d50e8.tar forums-2bb2e4a43b30bd3a686106865c84786de42d50e8.tar.gz forums-2bb2e4a43b30bd3a686106865c84786de42d50e8.tar.bz2 forums-2bb2e4a43b30bd3a686106865c84786de42d50e8.tar.xz forums-2bb2e4a43b30bd3a686106865c84786de42d50e8.zip |
Do not try to enter passive mode before logging in.
Return error if ftp_nlist() returned error.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9819 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_transfer.php')
-rw-r--r-- | phpBB/includes/functions_transfer.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index c345f81e1d..2146d5fa0b 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -316,15 +316,15 @@ class ftp extends transfer return 'ERR_CONNECTING_SERVER'; } - // attempt to turn pasv mode on - @ftp_pasv($this->connection, true); - // login to the server if (!@ftp_login($this->connection, $this->username, $this->password)) { return 'ERR_UNABLE_TO_LOGIN'; } + // attempt to turn pasv mode on + @ftp_pasv($this->connection, true); + // change to the root directory if (!$this->_chdir($this->root_path)) { @@ -462,6 +462,12 @@ class ftp extends transfer { $list = @ftp_nlist($this->connection, $dir); + // Return on error + if ($list === false) + { + return false; + } + // Remove path if prepended foreach ($list as $key => $item) { |