diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a74376d9f..f4386fd75 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -160,6 +160,7 @@ Matthew Watson Michael Davey Michael J. Sikorsky Michael McCallum +Michael Montuori Michael Newcomb Michael Saunders Miha diff --git a/WHATSNEW b/WHATSNEW index 6f0be0e06..f0940891b 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -232,6 +232,9 @@ Fixed bugs: erroneously deleted the "destination" file before attempting to rename the source file. Bugzilla 37701. +* can now handle uris with @s other than the final one denoting the + domain. Bugzilla 38082. + Other changes: -------------- * took in bugzilla report 39320. diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java index e74cb6fcb..7ae18c3cc 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java @@ -307,7 +307,7 @@ public class Scp extends SSHBase { } private String parseUri(String uri) { - int indexOfAt = uri.indexOf('@'); + int indexOfAt = uri.lastIndexOf('@'); int indexOfColon = uri.indexOf(':'); if (indexOfColon > -1 && indexOfColon < indexOfAt) { // user:password@host:/path notation