ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r632311 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
Date Fri, 29 Feb 2008 13:14:19 GMT
Author: xavier
Date: Fri Feb 29 05:14:17 2008
New Revision: 632311

URL: http://svn.apache.org/viewvc?rev=632311&view=rev
Log:
FIX: SFTP should verify input parameter for hostname (IVY-734)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=632311&r1=632310&r2=632311&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Fri Feb 29 05:14:17 2008
@@ -67,6 +67,7 @@
 - FIX: PublishEventsTest fails when Ivy sources are located in a directory with a + (IVY-755)
 - FIX: XML entity parsing does not work properly (IVY-737) (thanks to Patrick Woodworth)
 - FIX: Cachefileset task silently fails with parent dir ".." construct (IVY-638)
+- FIX: SFTP should verify input parameter for hostname (IVY-734)
 
    2.0.0-beta2
 =====================================

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java?rev=632311&r1=632310&r2=632311&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
Fri Feb 29 05:14:17 2008
@@ -91,6 +91,11 @@
                 }
             }
         }
+        if (host == null) {
+            throw new IllegalArgumentException(
+                "missing host information. host should be provided either "
+                + "directly on the repository or in the connection URI");
+        }
         if (user == null) {
              Credentials c = requestCredentials(host);
              if (c != null) {

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java?rev=632311&r1=632310&r2=632311&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java Fri Feb
29 05:14:17 2008
@@ -27,6 +27,7 @@
 import org.apache.ivy.core.event.IvyEvent;
 import org.apache.ivy.core.event.IvyListener;
 import org.apache.ivy.core.event.resolve.EndResolveEvent;
+import org.apache.ivy.util.Checks;
 import org.apache.ivy.util.Credentials;
 import org.apache.ivy.util.CredentialsUtil;
 import org.apache.ivy.util.Message;
@@ -304,6 +305,8 @@
      */
     public Session getSession(String host, int port, String username, String userPassword,
             File pemFile, String pemPassword, File passFile) throws IOException {
+        Checks.checkNotNull(host, "host");
+        Checks.checkNotNull(username, "user");
         Entry entry = getCacheEntry(username, host, port);
         Session session = null;
         if (entry != null) {



Mime
View raw message