Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Oct 2009 at 09:51 UTC
Updated:
5 Oct 2010 at 23:16 UTC
While testing #602520: Make FileTransfer form have one option for FTP (ftp_extension prefered)., I noticed that if you use the FileTransferFTPWrapper class (the file streams wrapper, not using the PHP FTP extension), and the FTP user you're trying to connect to has special characters (e.g. certain punctuation), the connect() fails since the is_dir() in here freaks out:
function connect() {
$this->connection = 'ftp://' . urlencode($this->username) . ':' . urlencode($this->password) . '@' . $this->hostname . ':' . $this->port . '/';
if (!is_dir($this->connection)) {
throw new FileTransferException('FTP Connection failed.');
}
}
I guess once we urlencode() them, is_dir() returns failure. Nearly 3am here now, so I have no brain power to decide if we're just handling this data wrong, if it's a PHP bug, or both. ;)
Comments
Comment #1
dwwwhoot! ;)
#612546: Remove the broken FileTransferFTPWrapper (file stream) class