[bittorrent] Bug in BitTorrent 4.20.4.
alan.mcgovern at gmail.com
Thu Aug 24 08:47:21 EDT 2006
You're right. I hadn't noticed the line saying "Keys must be strings and
appear in sorted order" before (took me a few reads to find it this time, i
was quite close to emailing back and asking you to quote the relevant
passage :p). Still, it would be nice if BitTorrent was able to give a useful
error message. The "error message" it gives is useless to both regular users
and developers, but that's neither here nor there.
Unfortunately i was the one who created the BEncoding section of our engine,
so the blame is all mine ;) Spent ages trying to hunt down the "bug".
Thankfully it's only a 1 line change to fix the problem.
On 8/24/06, Harold Feit <dwknight at depthstrike.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Rejecting a torrent that is not created in compliance with BEncoding
> specifications is not a bug.
> BEncoded Dictionary elements must be sorted as per
> http://wiki.theory.org/BitTorrentSpecification#bencoding or else they
> are in violation of the protocol. As such, having dictionary entries of
> 'created by' and 'creation date' in the wrong order is a malformed
> BEncode Dictionary.
> Alan McGovern wrote:
> > Hi,
> > I've tried emailing off the www.bittorrent.com
> > <http://www.bittorrent.com> site, but i got no reply. Basically, the
> > BitTorrent client will choke on parsing perfect .torrent files unless
> > the elements (creaion date, created by, comment etc) in the .torrent
> > are inserted in a specific order. There is a needless dependance on the
> > order of the BEncoded elements when it comes to decoding a .torrent
> > To test, just create a .torrent file with the order of the 'created by'
> > and 'creation date' elements reversed, that's enough to cause loading to
> > fail.
> > Thanks,
> > Alan.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> -----END PGP SIGNATURE-----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the BitTorrent