[ 
https://issues.apache.org/jira/browse/SSHD-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

dgü closed SSHD-1240.
---------------------
    Resolution: Not A Problem

Thank you!

> Wrong password in URI works
> ---------------------------
>
>                 Key: SSHD-1240
>                 URL: https://issues.apache.org/jira/browse/SSHD-1240
>             Project: MINA SSHD
>          Issue Type: Request
>    Affects Versions: 2.8.0
>         Environment: Java SE 8, Apache NetBeans IDE 12.5
>            Reporter: dgü
>            Priority: Major
>
> 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!
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to