mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Herzog-Uhl (JIRA)" <j...@apache.org>
Subject [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()
Date Mon, 01 Dec 2014 13:47:12 GMT
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)

Mime
View raw message