Public bug reported:

Binary package hint: zsync

Ubuntu 9.10 i386, zsync 0.6

DESCRIPTION

zsync doesn't check if the downloaded file is zsync metafile. The whole
metafile is downloaded and after that it is parsed. In normal situation,
metafile is small but unexperienced user can call zsync with wrong file
(like DVD/CD image) and in this case it is a problem as zsync dowloads
hundred of megabytes to find that all data are useless...

DEMO

try this:
$ zsync http://cdimage.ubuntu.com/daily/current/lucid-alternate-i386.iso

zsync downloaded about 650MB of data to find that unexperienced user
called it with wrong URL (URL of ISO file was entered, not URL of ZSYNC
file). 650MB of data was downloaded to be useless...

Correct command is this one (small change in URL only...):
$ zsync http://cdimage.ubuntu.com/daily/current/lucid-alternate-i386.iso.zsync

Smart (user friendly) zsync knows that most metadata files are small and
that it can check header if the file at command line is really zsync
file. From my point of view, zsync should download about 1kB (or 10kB,
etc) of the file first, check header and continue with download only in
the case that file is OK (is at roght version, etc). zsync file has
fixed structure, it should be easy to parse header to check if file is
zsync metadata file.

Example of zsync metafile (http://cdimage.ubuntu.com/daily/current
/lucid-alternate-i386.iso.zsync), header:

zsync: 0.5
Filename: lucid-alternate-i386.iso
Blocksize: 4096
Length: 673048576
Hash-Lengths: 2,3,5
URL: lucid-alternate-i386.iso
SHA-1: 9fd2e7fa32bdfcf3aebcb5e642db34cc99a825cd

@@@@@@@@@@@@@@@@ BINARY DATA ARE HERE  @@@@@@@@@@@@@@@@@

** Affects: zsync (Ubuntu)
     Importance: Undecided
         Status: New

-- 
zsync doesn't check metafile during download
https://bugs.launchpad.net/bugs/538717
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to