[
https://issues.apache.org/jira/browse/SSHD-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481190#comment-17481190
]
dgü commented on SSHD-1240:
---------------------------
Hello!
This is another question encountered in SSHD-1238.
I created URI instances with wrong passwords. But, It worked. The code:
{noformat}
*/
public static void main(String[] args) throws IOException,
URISyntaxException {
// Correct user info
URI uri = new URI("sftp://deneme:[email protected]:22");
try (FileSystem fs = FileSystems.newFileSystem(uri,
Collections.<String, Object>emptyMap())) {
// Wrong password
Path sourceFile = Paths.get(new
URI("sftp://deneme:[email protected]:22/C:/Users/XXX/Desktop/sil/sftp/sil1.txt"));
// Wrong password
Path targetFile = Paths.get(new
URI("sftp://deneme:[email protected]:22/C:/Users/XXX/Desktop/sil/sftp/sil2.txt"));
Files.copy(sourceFile, targetFile,
StandardCopyOption.REPLACE_EXISTING);
}
}
{noformat}
is this expected behaviour? I guess URI in _Paths.get_ matches only
host:port:user with URI in _FileSystems.newFileSystem_
Thanks in advance!
> Wrong password in URI works
> ---------------------------
>
> Key: SSHD-1240
> URL: https://issues.apache.org/jira/browse/SSHD-1240
> Project: MINA SSHD
> Issue Type: Request
> Reporter: dgü
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]