commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Lazarte (JIRA)" <>
Subject [jira] Commented: (VFS-162) Url parsing incorrect with @ symbol in the password field.
Date Thu, 24 May 2007 20:03:16 GMT


Ivan Lazarte commented on VFS-162:

Here is my first pass fix in: SftpFileNameParser

	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.  


> Url parsing incorrect with @ symbol in the password field.
> ----------------------------------------------------------
>                 Key: VFS-162
>                 URL:
>             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:
For additional commands, e-mail:

View raw message