Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unix curl ftp upload leads to corrupted zip file #576

Open
Speedy1991 opened this issue May 16, 2022 · 0 comments
Open

unix curl ftp upload leads to corrupted zip file #576

Speedy1991 opened this issue May 16, 2022 · 0 comments

Comments

@Speedy1991
Copy link

Running a command like this on a unix shell

curl -v -T 1652654118.zip --ftp-ssl --ssl-reqd --ftp-pasv ftp://<username>:<password>@<domain>:21

leads to a corrupted zip file:

unzip -t 1652654118.zip
Archive: 1652654118.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of 1652654118.zip or
1652654118.zip.zip, and cannot find 1652654118.zip.ZIP, period.

Try to repair it leads to:

zip -FF 1652654118.zip --out test.zip
Fix archive (-FF) - salvage what can
zip warning: Missing end (EOCDR) signature - either this archive
is not readable or the end is damaged

This happens only on unix curl's, on a mingw curl the zip file stays intact.

However, adding --limit-rate 10M to the curl command, leads to a valid zip file on unix.
This only happens with pyftpdlib and works as expected with e.g. the filezillaserver - so I'm pretty sure this bug must be in the pyftpd lib.

Tested with

  • curl 7.74.0 (x86_64-pc-linux-gnu) (does not work, also tried diffrent versions)
  • curl 7.71.1 (x86_64-w64-mingw32) (works)
  • pyftpdlib==1.5.6
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

No branches or pull requests

1 participant