ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r676603 - in /ant/core/trunk: WHATSNEW docs/manual/OptionalTasks/ftp.html src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
Date Mon, 14 Jul 2008 14:31:27 GMT
Author: bodewig
Date: Mon Jul 14 07:31:25 2008
New Revision: 676603

URL: http://svn.apache.org/viewvc?rev=676603&view=rev
Log:
allow ftp remote verification to be disabled.  PR 35471.  Suggested by Viacheslav Garmash.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/docs/manual/OptionalTasks/ftp.html
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=676603&r1=676602&r2=676603&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Mon Jul 14 07:31:25 2008
@@ -162,6 +162,9 @@
  * <ftp>'s logging has been improved.
    Bugzilla reports 30932, 31743.
 
+ * It is now possible to disable <ftp>'s remote verification.
+   Bugzilla report 35471.
+
 Changes from Ant 1.7.0 TO Ant 1.7.1
 =============================================
 

Modified: ant/core/trunk/docs/manual/OptionalTasks/ftp.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/OptionalTasks/ftp.html?rev=676603&r1=676602&r2=676603&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/OptionalTasks/ftp.html (original)
+++ ant/core/trunk/docs/manual/OptionalTasks/ftp.html Mon Jul 14 07:31:25 2008
@@ -243,9 +243,18 @@
   <tr>
     <td valign="top">initialSiteCommand</td>
     <td valign="top">Set a server-specific SITE command to execute immediately
-    after login.
+      after login.</td>
     <td valign="top" align="center">No</td>
   </tr>
+  <tr>
+    <td valign="top">enableRemoteVerification</td>
+    <td valign="top">Whether data connection sshould be verified to
+    connect to the same host as the control connection.  This is a
+    security measure that is enabled by default, but it may be useful
+    to disable it in certain firewall scenarios.
+      <em>since Ant 1.8.0</em></td>
+    <td valign="top" align="center">No, default is true</td>
+  </tr>
 
     <tr>
     <td colspan="3">

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java?rev=676603&r1=676602&r2=676603&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java Mon Jul 14
07:31:25 2008
@@ -136,6 +136,7 @@
     private int retriesAllowed = 0;
     private String siteCommand = null;
     private String initialSiteCommand = null;
+    private boolean enableRemoteVerification = true;
 
     protected static final String[] ACTION_STRS = {
         "sending",
@@ -1487,6 +1488,17 @@
     public void setInitialSiteCommand(String initialCommand) {
         this.initialSiteCommand = initialCommand;
     }
+
+    /**
+     * Whether to verify that data and control connections are
+     * connected to the same remote host.
+     *
+     * @since Ant 1.8.0
+     */
+    public void setEnableRemoteVerification(boolean b) {
+        enableRemoteVerification = b;
+    }
+
     /**
      * Checks to see that all required parameters are set.
      *
@@ -2282,6 +2294,7 @@
                 ftp = FTPConfigurator.configure(ftp, this);
             }
 
+            ftp.setRemoteVerificationEnabled(enableRemoteVerification);
             ftp.connect(server, port);
             if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
                 throw new BuildException("FTP connection failed: "



Mime
View raw message