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: Calum
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)

by Raziel.Azrael, 12 years ago

Attachment: edittrackersdialog.py added

A simple workaround

comment:1 by Raziel.Azrael, 12 years ago

Component: gtkuicore
Owner: set to Raziel.Azrael
Priority: minormajor
Status: newassigned
Summary: Unescaped tracker URLs in Edit Trackers DialogUnescaped 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

by Raziel.Azrael, 12 years ago

Attachment: torrent.py added

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

comment:2 by Raziel.Azrael, 12 years ago

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 by Raziel.Azrael, 12 years ago

Milestone: Future1.3.6

by Raziel.Azrael, 12 years ago

A patch to unquote magnet URLs before loading them with libtorrent

comment:4 by Calum, 12 years ago

Owner: changed from Raziel.Azrael to Calum

by Raziel.Azrael, 12 years ago

A patch to fix this issue (hopefull final )

comment:5 by Calum, 12 years ago

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 by Raziel.Azrael, 12 years ago

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 by Raziel.Azrael, 12 years ago

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

comment:8 by Raziel.Azrael, 12 years ago

Resolution: invalid
Status: assignedclosed
Summary: Unescaped tracker URLs when loaded from A Magnet URIOld libtorrent version, doesn't exist on 0.15.7 (supposing > )

comment:9 by Raziel.Azrael, 12 years ago

Summary: Old libtorrent version, doesn't exist on 0.15.7 (supposing > )Old libtorrent version, doesn't exist on 0.15.7 ( and assuming later versions )

comment:10 by Calum, 12 years ago

Summary: Old libtorrent version, doesn't exist on 0.15.7 ( and assuming later versions )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.