JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-4959

FtpConnectionFactory does not properly validate connections

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.2.5 (EE only)
  • Fix Version/s: 2.2.7 (EE only), 3.0.1
  • Component/s: Transport: FTP / SFTP
  • Labels:
    None
  • User impact:
    Medium
  • Similar Issues:
    None

Description

The validateObject method relies on an exception to be thrown to determine validity. The noop command can return a negative result without an exception.

FtpConnectionFactory.java:64
public boolean validateObject(Object obj)
    {
        FTPClient client = (FTPClient) obj;
        try
        {
            client.sendNoOp();
            return true;
        }
        catch (IOException e)
        {
            return false;
        }
    }

A possible fix would be to return the result of the noop command instead of returning true.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Dirk Olmes added a comment - 22/Oct/10 05:44 AM

2.2.x: http://fisheye.codehaus.org/changelog/mule/?cs=19992

Show
Dirk Olmes added a comment - 22/Oct/10 05:44 AM 2.2.x: http://fisheye.codehaus.org/changelog/mule/?cs=19992
Hide
Permalink
Dirk Olmes added a comment - 22/Oct/10 02:53 PM

3.0.x: http://fisheye.codehaus.org/changelog/mule/?cs=19993
3.x: http://fisheye.codehaus.org/changelog/mule/?cs=19994

Show
Dirk Olmes added a comment - 22/Oct/10 02:53 PM 3.0.x: http://fisheye.codehaus.org/changelog/mule/?cs=19993 3.x: http://fisheye.codehaus.org/changelog/mule/?cs=19994
Hide
Permalink
Arne Seime added a comment - 13/Jan/12 08:19 AM

Some servers return messages like "500 User Exit denies Userid 'YYYYYYY' from using Command 'NOOP'.", which renders the validateObject method above unusable (always returns false)

Example FileZilla log from a very restrictive FTP server setup:

Status:	Connecting to XXX.XXX.XX.XX:21...
Status:	Connection established, waiting for welcome message...
Response:	220-FTPD1 IBM FTP CS V1R12 at XYZ.COM, 14:17:26 on 2012-01-13.
Response:	220 Connection will close if idle for more than 5 minutes.
Command:	USER YYYYYY
Response:	331 Send password please.
Command:	PASS ******
Response:	230 YYYYYY is logged on.  Working directory is "/XXXX/YYYY".
Command:	SYST
Response:	215 UNIX is the operating system of this server. FTP Server is running on z/OS.
Command:	FEAT
Response:	500 User Exit denies Userid 'YYYYYY' from using Command 'FEAT'.
Status:	Connected

Maybe a solution could be to try to resend login credentials (or some other "dummy" command) in case sendNoop() returns false but no exception is thrown?

Show
Arne Seime added a comment - 13/Jan/12 08:19 AM Some servers return messages like "500 User Exit denies Userid 'YYYYYYY' from using Command 'NOOP'.", which renders the validateObject method above unusable (always returns false) Example FileZilla log from a very restrictive FTP server setup:
Status:	Connecting to XXX.XXX.XX.XX:21...
Status:	Connection established, waiting for welcome message...
Response:	220-FTPD1 IBM FTP CS V1R12 at XYZ.COM, 14:17:26 on 2012-01-13.
Response:	220 Connection will close if idle for more than 5 minutes.
Command:	USER YYYYYY
Response:	331 Send password please.
Command:	PASS ******
Response:	230 YYYYYY is logged on.  Working directory is "/XXXX/YYYY".
Command:	SYST
Response:	215 UNIX is the operating system of this server. FTP Server is running on z/OS.
Command:	FEAT
Response:	500 User Exit denies Userid 'YYYYYY' from using Command 'FEAT'.
Status:	Connected
Maybe a solution could be to try to resend login credentials (or some other "dummy" command) in case sendNoop() returns false but no exception is thrown?

People

  • Assignee:
    Dirk Olmes
    Reporter:
    Mike Cantrell
Vote (0)
Watch (2)

Dates

  • Created:
    14/Jul/10 09:35 AM
    Updated:
    13/Jan/12 08:19 AM
    Resolved:
    22/Oct/10 03:08 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.