Returning 502 on REIN
Fixes https://github.com/fclairamb/ftpserverlib/issues/472
Adds the REIN command, and returns a 502 status when it is received. This behaviour matches VSFTPD, and clients seem to choke when getting a 500 on a technically valid command.
EDIT: Have also added the NotImplemented handler for other standard commands that have not been implemented. We'd want to send a 502 for any commands that are actually standardised but not implemented, none of these would be syntax errors (500) by default.
Addressed the linter warning, have renamed the param to _.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 86.75%. Comparing base (
d9f0ff1) to head (c5b33a6). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #473 +/- ##
==========================================
+ Coverage 86.73% 86.75% +0.02%
==========================================
Files 11 11
Lines 1726 1729 +3
==========================================
+ Hits 1497 1500 +3
Misses 155 155
Partials 74 74
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Have a test for REIN, but I've added the other unimplemented commands in as well. Let me know if we want a test for each of them or a group test, or if just a listing is enough?
Sure, why not. This gives some idea of future commands to support.