Skip to content

feat: make MODE Z configurable#604

Merged
fclairamb merged 2 commits intofclairamb:mainfrom
drakkan:modez
Jan 24, 2026
Merged

feat: make MODE Z configurable#604
fclairamb merged 2 commits intofclairamb:mainfrom
drakkan:modez

Conversation

@drakkan
Copy link
Copy Markdown
Collaborator

@drakkan drakkan commented Jan 14, 2026

This is a non-standard FTP extension and is not supported by major clients:

https://trac.filezilla-project.org/ticket/2977
https://winscp.net/forum/viewtopic.php?t=25351

Additionally, it could potentially increase the attack surface, although I have not been able to fully verify this:

$ lftp ftp://127.0.0.1:2121
lftp 127.0.0.1:~> debug on;
lftp 127.0.0.1:~> set ftp:use-mode-z yes;
lftp 127.0.0.1:~> login a password
lftp a@127.0.0.1:~> ls
**** zlib inflate error: incorrect header check
ls: Errore fatale: zlib inflate error: incorrect header check
lftp a@127.0.0.1:/> quit

Do you know of any compatible client? Which client has it been tested with?

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.15%. Comparing base (d7a1353) to head (f9f44d2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #604      +/-   ##
==========================================
+ Coverage   87.14%   87.15%   +0.01%     
==========================================
  Files          12       12              
  Lines        1828     1830       +2     
==========================================
+ Hits         1593     1595       +2     
  Misses        157      157              
  Partials       78       78              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fclairamb
Copy link
Copy Markdown
Owner

Hi @drakkan , long time no see. Yes, this should be disabled by default. I don't even remember where this feature comes from. It has been almost two years since I created the PR around it. There are a few clients supporting it. I haven't fully tested it, I just want to see if claude code could finish this feature for me (I had a good understanding on how to fix it but not the motivation to make the core changes) and it did.

@fclairamb fclairamb merged commit 23fbe72 into fclairamb:main Jan 24, 2026
6 checks passed
@drakkan
Copy link
Copy Markdown
Collaborator Author

drakkan commented Jan 24, 2026

Hi @drakkan , long time no see.

Yes, sorry. Things with SFTPGo are going well, but it’s a very busy period and I don’t have time for anything else at the moment.

Yes, this should be disabled by default. I don't even remember where this feature comes from. It has been almost two years since I created the PR around it. There are a few clients supporting it. I haven't fully tested it, I just want to see if claude code could finish this feature for me (I had a good understanding on how to fix it but not the motivation to make the core changes) and it did.

Ok, let’s see if anyone uses it and reports a bug 😄 I just want to avoid introducing a breaking change for SFTPGo OSS users. In SFTPGo Enterprise, I’m currently using a fork of ftpserverlib with some very specific changes, and others that could be upstreamed in the future.

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.

2 participants