Menu

#22 ftp4che doesnt really check if it is logged in correctly

open
nobody
None
5
2007-06-01
2007-06-01
Anonymous
No

there is no check at all (in NormalFTPConnection's implementation of 'connect()') to check, how the server reponds to a new connection.

e.g. if it reponds with '421 Service not available' ftp4che continues to send user and pwd and thinks its logged in correctly, if the server doesnt abandon the connection.
i got a NPE from ReplyFormatter.parsePWDReply(line 42) because i tried to 'getFastDirectoryListing()' after such a 'successful' login.

ps: i would really appreciate more details in the javadoc (about when/why exceptions get thrown). since the source is available its not to hard to figure out whats going on, but a good library should provide sufficient documentation so that it is not necessary to dig the source all the time imho :)

Discussion


Log in to post a comment.