excalibur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shash Chatterjee (JIRA)" <...@excalibur.apache.org>
Subject [jira] Assigned: (EXLBR-15) In org.apache.excalibur.source.impl.FTPSource, URL.getXYZ() results must be URL-decoded
Date Sat, 16 Apr 2005 15:39:04 GMT
     [ http://issues.apache.org/jira/browse/EXLBR-15?page=history ]

Shash Chatterjee reassigned EXLBR-15:

    Assign To: Shash Chatterjee

> In org.apache.excalibur.source.impl.FTPSource, URL.getXYZ() results must be URL-decoded
> ---------------------------------------------------------------------------------------
>          Key: EXLBR-15
>          URL: http://issues.apache.org/jira/browse/EXLBR-15
>      Project: Excalibur Components
>         Type: Bug
>   Components: SourceResolver
>     Versions: 1.1.1
>  Environment: Windows XP, Unix, J2SE 1.4.2
>     Reporter: Nico Verwer
>     Assignee: Shash Chatterjee
>  Attachments: FTPSource.java
> The getXYZ() methods in java.net.URL give results which are URL-encoded, if the URL was
constructed from a String (which must be URL-encoded). This may be considered a bug in java.net.URL,
but it is the way it is.
> In order to get the right URL-components (path, userinfo, etc.),  the method java.net.URLDecoder.decode()
must be applied to the result of java.net.URL.getXYZ(). The result of getUserInfo must first
be split (on ':') before decoding is applied.
> Example of how this affects functionality of FTPSource:
> URLs for FTP may contain a password:
>   ftp://user:password@host/path
> If the password contains the '@' character, like
>   ftp://user:p@ssw0rd@host/path
> this will be interpreted as user 'user' with password 'p' and host 'ssw0rd@host', which
is wrong. In order to allow reserved characters in URL's, URL-encoding is used (see RFC 1738
for this particular case, and others). For instance, '@' would be encoded by '%40' in the
string-representation of the URL.
> Because URL-components are not decoded in FTPSource, it is impossible to use a password
containing '@', or other parts of the URL that contain reserved characters.
> This problem is easy to fix using URLDecoder.
> I'll see if I can attach the code for this fix.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

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

View raw message