You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Ivan Lazarte (JIRA)" <ji...@apache.org> on 2007/05/24 19:35:16 UTC

[jira] Created: (VFS-162) Url parsing incorrect with @ symbol in the password field.

Url parsing incorrect with @ symbol in the password field.
----------------------------------------------------------

                 Key: VFS-162
                 URL: https://issues.apache.org/jira/browse/VFS-162
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.0
         Environment: N/A
            Reporter: Ivan Lazarte


The file system being used used is SftpFileSystem.  After an initial look into, I'd have to subclass and invoke the Jsch libs directly to potentially set the pw programmatically?  It'd be nice if Sftp could accept a high level, non api specific method for programmatically setting the pw.  

Expected behavior is to choose the rightmost @ as the host delimiter, but a higher level programmatic api is a nice to have as well.
If I've missed anything in the api which lets me do this already, just let me know! :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Resolved: (VFS-162) Url parsing incorrect with @ symbol in the password field.

Posted by "Mario Ivankovits (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VFS-162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Ivankovits resolved VFS-162.
----------------------------------

    Resolution: Won't Fix

> Url parsing incorrect with @ symbol in the password field.
> ----------------------------------------------------------
>
>                 Key: VFS-162
>                 URL: https://issues.apache.org/jira/browse/VFS-162
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: N/A
>            Reporter: Ivan Lazarte
>         Attachments: vfs-bug-fix.zip
>
>
> The file system being used used is SftpFileSystem.  After an initial look into, I'd have to subclass and invoke the Jsch libs directly to potentially set the pw programmatically?  It'd be nice if Sftp could accept a high level, non api specific method for programmatically setting the pw.  
> Expected behavior is to choose the rightmost @ as the host delimiter, but a higher level programmatic api is a nice to have as well.
> If I've missed anything in the api which lets me do this already, just let me know! :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (VFS-162) Url parsing incorrect with @ symbol in the password field.

Posted by "Ivan Lazarte (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/VFS-162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Lazarte updated VFS-162:
-----------------------------

    Attachment: vfs-bug-fix.zip

Attached is a workaround I've made and includes a demo main.  Feel free to edit as necessary.

> Url parsing incorrect with @ symbol in the password field.
> ----------------------------------------------------------
>
>                 Key: VFS-162
>                 URL: https://issues.apache.org/jira/browse/VFS-162
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: N/A
>            Reporter: Ivan Lazarte
>         Attachments: vfs-bug-fix.zip
>
>
> The file system being used used is SftpFileSystem.  After an initial look into, I'd have to subclass and invoke the Jsch libs directly to potentially set the pw programmatically?  It'd be nice if Sftp could accept a high level, non api specific method for programmatically setting the pw.  
> Expected behavior is to choose the rightmost @ as the host delimiter, but a higher level programmatic api is a nice to have as well.
> If I've missed anything in the api which lets me do this already, just let me know! :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (VFS-162) Url parsing incorrect with @ symbol in the password field.

Posted by "Mario Ivankovits (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VFS-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498955 ] 

Mario Ivankovits commented on VFS-162:
--------------------------------------

Special characters have to be encoded. In your case the @ should be written as %40.

And then there is an api which you can use. We have some *FileSystemConfiguBuilder which will help you there.

See [1] to get a clue.

Ciao,
Mario

[1] http://jakarta.apache.org/commons/vfs/api.html

> Url parsing incorrect with @ symbol in the password field.
> ----------------------------------------------------------
>
>                 Key: VFS-162
>                 URL: https://issues.apache.org/jira/browse/VFS-162
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: N/A
>            Reporter: Ivan Lazarte
>         Attachments: vfs-bug-fix.zip
>
>
> The file system being used used is SftpFileSystem.  After an initial look into, I'd have to subclass and invoke the Jsch libs directly to potentially set the pw programmatically?  It'd be nice if Sftp could accept a high level, non api specific method for programmatically setting the pw.  
> Expected behavior is to choose the rightmost @ as the host delimiter, but a higher level programmatic api is a nice to have as well.
> If I've missed anything in the api which lets me do this already, just let me know! :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (VFS-162) Url parsing incorrect with @ symbol in the password field.

Posted by "Ivan Lazarte (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/VFS-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498801 ] 

Ivan Lazarte commented on VFS-162:
----------------------------------

Here is my first pass fix in: SftpFileNameParser

	@Override
	protected String extractUserInfo(StringBuffer name) {

		int pos = name.lastIndexOf("@");

		if (pos < 0) {
			return null;
		}

		String userInfo = name.substring(0, pos);
		name.delete(0, pos + 1);

		if (userInfo.contains("/") || userInfo.contains("?")) {
			return null;
		}

		return userInfo;
	}

I believe this does the same thing logically as the originally except it looks for the last index.  However, I'm having a hard time getting a valid filesystem instance out of this- the path to integration is unclear to me.  If someone could advise a workaround, that would be really helpful.  

Thanks!

> Url parsing incorrect with @ symbol in the password field.
> ----------------------------------------------------------
>
>                 Key: VFS-162
>                 URL: https://issues.apache.org/jira/browse/VFS-162
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: N/A
>            Reporter: Ivan Lazarte
>
> The file system being used used is SftpFileSystem.  After an initial look into, I'd have to subclass and invoke the Jsch libs directly to potentially set the pw programmatically?  It'd be nice if Sftp could accept a high level, non api specific method for programmatically setting the pw.  
> Expected behavior is to choose the rightmost @ as the host delimiter, but a higher level programmatic api is a nice to have as well.
> If I've missed anything in the api which lets me do this already, just let me know! :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org