You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Goldstein Lyor (JIRA)" <ji...@apache.org> on 2015/03/30 07:59:53 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14386233#comment-14386233 ] 

Goldstein Lyor commented on SSHD-376:
-------------------------------------

I believe this is moot in view of SSHD-378 - which will be available on version 1.0

> 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, NativeFileSystemView.java.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> On Windows the command System.getProperty("user.dir") can produce a path starting with upper or lowercase Symbol. Depending on how you start it.
> The NativeFileSystemFactory creates NativeFileSystemView which uses System.getProperty("user.dir") which can start with lower or uppercase Root and checks against Upperacse Root with Method current.startsWith()
> 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)