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:47:12 UTC

[jira] [Created] (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()

Christian Herzog-Uhl created SSHD-376:
-----------------------------------------

             Summary: 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


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)