[ruby-core:71146] [Ruby trunk - Feature #11612] [Open] The default mode of Net::FTP should be passive

From: shugo@...
Date: 2015-10-22 08:54:34 UTC
List: ruby-core #71146
Issue #11612 has been reported by Shugo Maeda.

----------------------------------------
Feature #11612: The default mode of Net::FTP should be passive
https://bugs.ruby-lang.org/issues/11612

* Author: Shugo Maeda
* Status: Open
* Priority: Normal
* Assignee: Shugo Maeda
----------------------------------------
The default mode of Net::FTP is active for historical reasons, but it should be changed to passive
because active data connections might be blocked by a local firewall.
Passive data connections might also be blocked by a firewall, but such cases are relatively rare.

In Python, the default mode was changed to passive since Python 2.1.
In Perl, the default mode was changed to passive since libnet-1.21.

One concern is backward compatibility.  For example the following code in open-uri.rb wouldn't work
if the default mode is changed.

    ftp.passive = true if !options[:ftp_active_mode]

The code has to be changed as follows:

    ftp.passive = !options[:ftp_active_mode]

It might be better to check the environment variable FTP_PASSIVE as Perl does.

Any thoughts?




-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next