From 81e67fbef141ea47249b5f9d1a4e1cb34263b248 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 22 Jul 2009 01:26:09 +0000 Subject: [PATCH] Fix bug #46295 - Be less strict with FTP daemons when getting directory filelists. Authorised by: bantu ;-) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9820 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/functions_transfer.php | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 8b5da10c72..356987cd33 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -169,6 +169,7 @@
  • [Fix] Display required fields notice on registration above the custom profile fields. (Bug #39665)
  • [Fix] Copy poll options properly when copying topic. (Bug #39065)
  • [Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)
  • +
  • [Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)
  • [Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
  • [Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
  • [Change] Template engine now permits to a limited extent variable includes.
  • diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index 2146d5fa0b..c1211eda52 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -462,6 +462,14 @@ class ftp extends transfer { $list = @ftp_nlist($this->connection, $dir); + // See bug #46295 - Some FTP daemons don't like './' + if ($dir === './') + { + // Let's try some alternatives + $list = (empty($list)) ? @ftp_nlist($this->connection, '.') : $list; + $list = (empty($list)) ? @ftp_nlist($this->connection, '') : $list; + } + // Return on error if ($list === false) {