Opened 3 years ago

#10945 new Feature request

Allow TYPE I before logon

Reported by: Kurt McKee Owned by:
Priority: normal Component: FileZilla Server
Keywords: type ascii binary cisco nx-os Cc:
Component version: 0.9.58 Operating system type: Windows
Operating system version: Windows 7 Enterprise SP1

Description

I would like FileZilla Server to allow clients to send TYPE I before logon (similar to #9878 allowing OPTS UTF8 ON before logon).

This is because the Cisco MDS 9710 firmware, NX-OS version 6.2.1, has a bug: it sends TYPE I before logon. The command is rejected, resulting in the firmware files transferring in ASCII mode (and getting corrupted in the process). This behavior is fixed in later firmware versions. Cisco firmware does not offer a generic FTP client (it only prompts me for the host, username, password, and path) so it appears the only way to overcome this bug is on the FTP server side.

Based on SVN commit r6120 that fixed #9878, I have created and attached a possible patch. However, I don't know how to compile the source to test the patch.

Failed firmware update: NX-OS 6.2(1)

Note line 5, where the old switch firmware sends "TYPE I" before logon.

(000001) 8/19/2016 11:53:53 AM - (not logged in) (192.168.0.10)> Connected on port 21, sending welcome message...
(000001) 8/19/2016 11:53:53 AM - (not logged in) (192.168.0.10)> 220-FileZilla Server 0.9.58 beta
(000001) 8/19/2016 11:53:53 AM - (not logged in) (192.168.0.10)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000001) 8/19/2016 11:53:53 AM - (not logged in) (192.168.0.10)> 220 Please visit https://filezilla-project.org/
------------------------------------------------------------------------------------------------------------
(000001) 8/19/2016 11:53:53 AM - (not logged in) (192.168.0.10)> TYPE I
(000001) 8/19/2016 11:53:53 AM - (not logged in) (192.168.0.10)> 530 Please log in with USER and PASS first.
------------------------------------------------------------------------------------------------------------
(000001) 8/19/2016 11:53:53 AM - (not logged in) (192.168.0.10)> USER upload
(000001) 8/19/2016 11:53:53 AM - (not logged in) (192.168.0.10)> 331 Password required for upload
(000001) 8/19/2016 11:53:56 AM - (not logged in) (192.168.0.10)> PASS ********
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> 230 Logged on
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> SYST
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> 215 UNIX emulated by FileZilla
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> FEAT
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> 211-Features:
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  MDTM
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  REST STREAM
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  SIZE
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  MLST type*;size*;modify*;
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  MLSD
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  UTF8
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  CLNT
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  MFMT
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  EPSV
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)>  EPRT
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> 211 End
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> SIZE /cisco/nx-os/6.2.13a/m9700-sf3ek9-kickstart-mz.6.2.13a.bin
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> 213 36789248
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> EPSV
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> 229 Entering Extended Passive Mode (|||55451|)
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> RETR /cisco/nx-os/6.2.13a/m9700-sf3ek9-kickstart-mz.6.2.13a.bin
(000001) 8/19/2016 11:53:56 AM - upload (192.168.0.10)> 150 Opening data channel for file download from server of "/cisco/nx-os/6.2.13a/m9700-sf3ek9-kickstart-mz.6.2.13a.bin"
(000001) 8/19/2016 11:53:59 AM - upload (192.168.0.10)> 226 Successfully transferred "/cisco/nx-os/6.2.13a/m9700-sf3ek9-kickstart-mz.6.2.13a.bin"
(000001) 8/19/2016 11:53:59 AM - upload (192.168.0.10)> MDTM /cisco/nx-os/6.2.13a/m9700-sf3ek9-kickstart-mz.6.2.13a.bin
(000001) 8/19/2016 11:53:59 AM - upload (192.168.0.10)> 213 20160628160400
(000001) 8/19/2016 11:53:59 AM - upload (192.168.0.10)> QUIT
(000001) 8/19/2016 11:53:59 AM - upload (192.168.0.10)> 221 Goodbye
(000001) 8/19/2016 11:53:59 AM - upload (192.168.0.10)> disconnected.

Successful firmware update: NX-OS 6.2(13a)

Note that the new firmware version sends TYPE I after logon.

(000001) 8/19/2016 11:25:28 AM - (not logged in) (192.168.0.10)> Connected on port 21, sending welcome message...
(000001) 8/19/2016 11:25:28 AM - (not logged in) (192.168.0.10)> 220-FileZilla Server 0.9.58 beta
(000001) 8/19/2016 11:25:28 AM - (not logged in) (192.168.0.10)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org)
(000001) 8/19/2016 11:25:28 AM - (not logged in) (192.168.0.10)> 220 Please visit https://filezilla-project.org/
(000001) 8/19/2016 11:25:28 AM - (not logged in) (192.168.0.10)> USER upload
(000001) 8/19/2016 11:25:28 AM - (not logged in) (192.168.0.10)> 331 Password required for upload
(000001) 8/19/2016 11:25:30 AM - (not logged in) (192.168.0.10)> PASS ********
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> 230 Logged on
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> SYST
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> 215 UNIX emulated by FileZilla
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> FEAT
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> 211-Features:
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  MDTM
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  REST STREAM
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  SIZE
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  MLST type*;size*;modify*;
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  MLSD
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  UTF8
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  CLNT
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  MFMT
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  EPSV
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)>  EPRT
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> 211 End
-------------------------------------------------------------------------
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> TYPE I
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> 200 Type set to I
-------------------------------------------------------------------------
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> SIZE /cisco/nx-os/6.2.1/m9700-sf3ek9-kickstart-mz.6.2.1.bin
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> 213 36701184
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> EPSV
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> 229 Entering Extended Passive Mode (|||63073|)
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> RETR /cisco/nx-os/6.2.1/m9700-sf3ek9-kickstart-mz.6.2.1.bin
(000001) 8/19/2016 11:25:30 AM - upload (192.168.0.10)> 150 Opening data channel for file download from server of "/cisco/nx-os/6.2.1/m9700-sf3ek9-kickstart-mz.6.2.1.bin"
(000001) 8/19/2016 11:25:33 AM - upload (192.168.0.10)> 226 Successfully transferred "/cisco/nx-os/6.2.1/m9700-sf3ek9-kickstart-mz.6.2.1.bin"
(000001) 8/19/2016 11:25:33 AM - upload (192.168.0.10)> MDTM /cisco/nx-os/6.2.1/m9700-sf3ek9-kickstart-mz.6.2.1.bin
(000001) 8/19/2016 11:25:33 AM - upload (192.168.0.10)> 213 20160812200254
(000001) 8/19/2016 11:25:33 AM - upload (192.168.0.10)> QUIT
(000001) 8/19/2016 11:25:33 AM - upload (192.168.0.10)> 221 Goodbye
(000001) 8/19/2016 11:25:33 AM - upload (192.168.0.10)> disconnected.

Attachments (1)

allow-TYPE-prior-to-logon.patch (531 bytes) - added by Kurt McKee 3 years ago.
Allow TYPE I prior to logon (affects ControlSocket.cpp in FileZilla server 0.9.58 source)

Download all attachments as: .zip

Change History (1)

Changed 3 years ago by Kurt McKee

Allow TYPE I prior to logon (affects ControlSocket.cpp in FileZilla server 0.9.58 source)

Note: See TracTickets for help on using tickets.