Allow "QUIT " without issuing syntax error
I have an IP camera that has a trailing space in its QUIT command.
E.g.
220 wconrad/ftpd 2.1.0
USER ...
331 Password required
PASS ...
230 Logged in
TYPE I
200 Type set to I
CWD .//20180918/images/
250 "/20180918/images" is current directory
PASV
227 Entering passive mode (10,0,2,20,153,173)
STOR P18091815472210.jpg
150 Opening BINARY mode data connection
226 Transfer complete
QUIT
501 Syntax error
By allowing an empty/blank argument parameter to the quit command this error can be suppressed, meaning less noise in the logs.
Worth adding?
Something like that seems useful. Maybe just drum trailing spaces for all commands.
On Mon, Sep 17, 2018, 21:16 Michael Adams [email protected] wrote:
I have an IP camera that has a trailing space in its QUIT command.
E.g.
220 wconrad/ftpd 2.1.0 USER ... 331 Password required PASS ... 230 Logged in TYPE I 200 Type set to I CWD .//20180918/images/ 250 "/20180918/images" is current directory PASV 227 Entering passive mode (10,0,2,20,153,173) STOR P18091815472210.jpg 150 Opening BINARY mode data connection 226 Transfer complete QUIT 501 Syntax error
By allowing an empty/blank argument parameter to the quit command this error can be suppressed, meaning less noise in the logs.
Worth adding?
You can view, comment on, or merge this pull request online at:
https://github.com/wconrad/ftpd/pull/52 Commit Summary
- Allow "QUIT " without issuing syntax error
File Changes
- M lib/ftpd/cmd_quit.rb https://github.com/wconrad/ftpd/pull/52/files#diff-0 (2)
Patch Links:
- https://github.com/wconrad/ftpd/pull/52.patch
- https://github.com/wconrad/ftpd/pull/52.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wconrad/ftpd/pull/52, or mute the thread https://github.com/notifications/unsubscribe-auth/AB2JiBJ9mpx4pupR8gAjOx1VhCeMc3frks5ucHO7gaJpZM4WtIjU .
Fair enough, I've moved it up the pipeline a bit to nilify empty arguments for all commands. This however broke unit tests when sending a blank password (e.g. PASS ) so I've changed the password for the unit tests to "password".