You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Christian Herzog-Uhl (JIRA)" <ji...@apache.org> on 2014/12/01 14:49:12 UTC

[jira] [Updated] (SSHD-376) NativeFileSystemFactory creates NativeFileSystemView which uses System.getProperty("user.dir") which can start with lower or uppercase Root and checks against Upperacse Root with String.startsWith()

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

Christian Herzog-Uhl updated SSHD-376:
--------------------------------------
    Attachment: NativeFileSystemFactoryTest.java

JunitTestCase

> NativeFileSystemFactory creates NativeFileSystemView which uses System.getProperty("user.dir") which can start with lower or uppercase Root and checks against Upperacse Root with String.startsWith()
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SSHD-376
>                 URL: https://issues.apache.org/jira/browse/SSHD-376
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.13.0
>         Environment: Java 1.8, Windows 7
>            Reporter: Christian Herzog-Uhl
>              Labels: easyfix, patch
>         Attachments: NativeFileSystemFactoryTest.java
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> On Windows the command System.getProperty("user.dir") can produce a path starting with upper or lowercase Symbol. Dependen on how you start it.
> public NativeFileSystemView(String userName, Map<String, String> roots, String current, char separator, boolean caseInsensitive) {
>         // Verify the current dir is relative to a known root
>         String root = null;
>         for (String r : verRoots.keySet()) {
>             if (current.startsWith(r)) {



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)