commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Commented] (NET-474) Problem, in __getReply method, parsing reply code with leading space
Date Tue, 10 Jul 2012 17:02:35 GMT


Sebb commented on NET-474:

Sorry, but unless you can point to documentation that says that leading spaces are allowed
by the FTP protocol, then the bug is in the server, not Commons NET.

I suggest advising them that the server appears to be faulty so they can contact their supplier
to get it fixed.

[By the way, a net search suggests that version 5.0.2 is quite old, and may have some security
issues, so it might be as well to upgrade anyway. That might well fix the reply format too.]
> Problem, in __getReply method, parsing reply code with leading space
> --------------------------------------------------------------------
>                 Key: NET-474
>                 URL:
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.1
>         Environment: UNIX
>            Reporter: Ahmad AMIN
>             Fix For: 3.2
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> FTPClient.getStatus() function call failed complaining about malformed response code.
> After tracing the code, I found the problem at following class and line:
> **
> The issue is that this method always expects reply code at position 0 of the returned
reply string. If the reply string has some leading spaces, it fails to parse the reply code
and returns malformed reply string.
> Example of such a reply string:
> {noformat}
>       211-nhpssltest Ipswitch FTP Server
>       Version 5.0.2
>       Connected to
>       Logged in as massba
>       TYPE: ASCII, FORM: Nonprint; STRUcture: File; transfer MODE: STREAM
>       No data connection
> 211 End of status
> {noformat}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message