Skip to content

Conversation

@sudhirj
Copy link
Contributor

@sudhirj sudhirj commented Jul 30, 2024

Fixes #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.

@sudhirj
Copy link
Contributor Author

sudhirj commented Aug 6, 2024

Addressed the linter warning, have renamed the param to _.

@codecov
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sudhirj
Copy link
Contributor Author

sudhirj commented Aug 6, 2024

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?

@fclairamb
Copy link
Owner

Sure, why not. This gives some idea of future commands to support.

@fclairamb fclairamb enabled auto-merge (squash) September 28, 2024 21:14
@fclairamb fclairamb merged commit 8cee334 into fclairamb:main Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return 502 on the REIN command

3 participants