Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2087 closed bug (Invalid)

Unescaped tracker URLs when loaded from A Magnet URI

Reported by: Raziel.Azrael Owned by: Cas
Priority: major Milestone: 1.3.6
Component: Core Version: 1.3.5
Keywords: Cc:

Description

When a user opens the edit trackers dialog, trackers may appear in unfriendly human format such as: "udp%3A%2F%2Ftracker.publicbt.com%3A80"

A simple workaround is to call urllib.unquote on the tracker urls when building the list

Attachments (4)

edittrackersdialog.py (8.9 KB) - added by Raziel.Azrael 12 years ago.
A simple workaround
torrent.py (35.9 KB) - added by Raziel.Azrael 12 years ago.
A simple fix in the Torrent.py file when a torrent is loaded
0001-unquote-magnet-URIs-before-adding-them.patch (1.1 KB) - added by Raziel.Azrael 12 years ago.
A patch to unquote magnet URLs before loading them with libtorrent
0001-unquote-magnet-URIs-before-processing-them.patch (1.0 KB) - added by Raziel.Azrael 12 years ago.
A patch to fix this issue (hopefull final )

Download all attachments as: .zip

Change History (14)

Changed 12 years ago by Raziel.Azrael

A simple workaround

comment:1 Changed 12 years ago by Raziel.Azrael

  • Component changed from gtkui to core
  • Owner set to Raziel.Azrael
  • Priority changed from minor to major
  • Status changed from new to assigned
  • Summary changed from Unescaped tracker URLs in Edit Trackers Dialog to Unescaped tracker URLs when loaded from A Magnet URI

It seems that this bug is not purely cosmetic, and actually trackers need to be unescaped at loading time, else they are considered invalid

Changed 12 years ago by Raziel.Azrael

A simple fix in the Torrent.py file when a torrent is loaded

comment:2 Changed 12 years ago by Raziel.Azrael

I have added a simple fix in torrent.py , when a torrent is created it's tracker urls will be unquoted in any case, seems to fix the issue

comment:3 Changed 12 years ago by Raziel.Azrael

  • Milestone changed from Future to 1.3.6

Changed 12 years ago by Raziel.Azrael

A patch to unquote magnet URLs before loading them with libtorrent

comment:4 Changed 12 years ago by Cas

  • Owner changed from Raziel.Azrael to Cas

Changed 12 years ago by Raziel.Azrael

A patch to fix this issue (hopefull final )

comment:5 Changed 12 years ago by Cas

I am unable to replicate the issue so will need a bit more info.

What version of libtorrent are you using? Could you include a log of the magnet string just before it is used in lt.add_magnet_uri.

comment:6 Changed 12 years ago by Raziel.Azrael

I tried a windows distribution of deluge with I think libtorrent 0.15.0 and this bug seems to not exist in my case.

Under Ubuntu this bug seems to exist with libtorrent 0.15.4.0

Here is an example magnet link that I have used:

"magnet:?xt=urn:btih:8ac3731ad4b039c05393b5404afa6e7397810b41&dn=ubuntu-11.10-desktop-i386.iso&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80"

And this is the same way it is passed to the torrentmanager to be added.

comment:7 Changed 12 years ago by Raziel.Azrael

It seems that this was a libtorrent bug, I updated my libtorrent to 0.15.7 and this bug no longer exists

comment:8 Changed 12 years ago by Raziel.Azrael

  • Resolution set to invalid
  • Status changed from assigned to closed
  • Summary changed from Unescaped tracker URLs when loaded from A Magnet URI to Old libtorrent version, doesn't exist on 0.15.7 (supposing > )

comment:9 Changed 12 years ago by Raziel.Azrael

  • Summary changed from Old libtorrent version, doesn't exist on 0.15.7 (supposing > ) to Old libtorrent version, doesn't exist on 0.15.7 ( and assuming later versions )

comment:10 Changed 12 years ago by Cas

  • Summary changed from Old libtorrent version, doesn't exist on 0.15.7 ( and assuming later versions ) to Unescaped tracker URLs when loaded from A Magnet URI

I did not think you would be using such an old version of libtorrent.

If you are using Ubuntu you can get 0.15.9 from the PPA which includes some critical fixes.

Note: See TracTickets for help on using tickets.