Opened 4 years ago

Closed 4 years ago

#1994 closed defect (fixed)

zzzot scrape returns malformed info_hash

Reported by: lazygravy Owned by: lazygravy
Priority: minor Milestone: 0.9.31
Component: apps/plugins Version: 0.9.30
Keywords: zzzot Cc:
Parent Tickets: Sensitive: no


The zzzot scrape returns malformed info_hashes. According to the BEP spec, they should be 20bytes long.

Here's an example URL of a bad hash: http://utnamrwujeccu7aj7aau7k2ld4evz5t47iogpjo2wgagbihi3jkq.b32.i2p/scrape

Here's a good one: http://5m3pd32zx43xk3uz6hvrdksj6tlg7abnjsc3j5kkd2yzctet4nmq.b32.i2p/scrape

Note how 5m3… has info_hashes of all 20


Attachments (1)

1994.diff (6.3 KB) - added by lazygravy 4 years ago.
Patch to fix it!

Download all attachments as: .zip

Change History (3)

comment:1 Changed 4 years ago by lazygravy

zzz did some debugging and found that the issue was in the BEncode'ing in snark. Snark changes the encofing to UTF-8. I've attached a hackish patch to resolve the issue. Some quick tests show it's working. 😊

NOTE: In the patch I commented out some code instead of copying over the necessary classes. Like I said, it's hackish

Changed 4 years ago by lazygravy

Attachment: 1994.diff added

Patch to fix it!

comment:2 Changed 4 years ago by zzz

Milestone: undecided0.9.31
Resolution: fixed
Status: newclosed

Bencoder was UTF-8 encoding the hashes. Above fix would have worked for zzzot alone, since it doesn't need UTF-8, but wouldn't for a fix on the snark side. To keep the licensing straight, fixed on the snark side by allowing and correctly encoding byte[]s as keys in maps.

In 584df860d1458f9e535ac31acf8a665664d74ad3 I2P 0.9.30-8 and zzzot 97982a658b8c4e41238ec4b0b2443f0fcea4f733 0.16.0

requires both to work
thanks for the report, initial patch, and testing

Note: See TracTickets for help on using tickets.