<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>339584</bug_id>
          
          <creation_ts>2014-10-01 19:41:30 +0000</creation_ts>
          <short_desc>Web Interface has problems in loading certain magnet links</short_desc>
          <delta_ts>2014-11-08 11:54:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>ktorrent</product>
          <component>general</component>
          <version>4.3.1</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Leszek Lesner">leszek.lesner</reporter>
          <assigned_to name="Joris Guisson">joris.guisson</assigned_to>
          
          
          <cf_commitlink>http://commits.kde.org/ktorrent/2af04ef8e6607625458ca557dd26689503f17789</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1474094</commentid>
    <comment_count>0</comment_count>
    <who name="Leszek Lesner">leszek.lesner</who>
    <bug_when>2014-10-01 19:41:30 +0000</bug_when>
    <thetext>I was informed by one of our users that ktorrent has problems in the web user interface with opening certain magnet links. 
Example (only for the sake of example): 
This works fine: 
magnet:?xt=urn:btih:385821e75c87064d4a641bb3d6e23c6585d2e8c7&amp;dn=2005+-+System+Of+A+Down+-+Mezmerize+%5BLimited+Edition+Picture+Dis&amp;tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&amp;tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&amp;tr=udp%3A%2F%2Ftracker.istole.it%3A6969&amp;tr=udp%3A%2F%2Fopen.demonii.com%3A1337

This one doesn&apos;t:
magnet:?xt=urn:btih:bdd19c5f47cd6ad8c1791e5f2eba898d550fc680&amp;dn=System+Of+A+Down+-+Mezmerize+%282005%29+Flac%5B24+Bit+96KHz+Vinyl%5D&amp;tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&amp;tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&amp;tr=udp%3A%2F%2Ftracker.istole.it%3A6969&amp;tr=udp%3A%2F%2Fopen.demonii.com%3A1337



Reproducible: Always

Steps to Reproduce:
1. Enable Web Interface
2. Try to load &quot;not working marked link&quot;

Actual Results:  
Produces an error (wrong link ?.)

Expected Results:  
Load magnet link. 

I discovered that double escaping the url.value somehow seems to fix this issue. See attached patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1474095</commentid>
    <comment_count>1</comment_count>
      <attachid>88922</attachid>
    <who name="Leszek Lesner">leszek.lesner</who>
    <bug_when>2014-10-01 19:42:05 +0000</bug_when>
    <thetext>Created attachment 88922
Patch for action.js</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1480237</commentid>
    <comment_count>2</comment_count>
    <who name="Joris Guisson">joris.guisson</who>
    <bug_when>2014-11-08 11:54:47 +0000</bug_when>
    <thetext>Git commit 2af04ef8e6607625458ca557dd26689503f17789 by Joris Guisson.
Committed on 08/11/2014 at 11:54.
Pushed by guisson into branch &apos;master&apos;.

Fix some magnet links not working in webinterface plugin
REVIEW: 120808

M  +1    -0    ChangeLog
M  +1    -0    ktorrent/main.cpp
M  +2    -1    plugins/webinterface/www/common/action.js

http://commits.kde.org/ktorrent/2af04ef8e6607625458ca557dd26689503f17789</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>88922</attachid>
            <date>2014-10-01 19:42:05 +0000</date>
            <delta_ts>2014-10-01 19:42:05 +0000</delta_ts>
            <desc>Patch for action.js</desc>
            <filename>action_js.patch</filename>
            <type>text/plain</type>
            <size>436</size>
            <attacher name="Leszek Lesner">leszek.lesner</attacher>
            
              <data encoding="base64">LS0tIGEvYWN0aW9uLmpzCTIwMTMtMDEtMTQgMTg6MTI6MjQuMDAwMDAwMDAwICswMTAwCisrKyBi
L2FjdGlvbi5qcwkyMDE0LTEwLTAxIDIxOjM5OjU5LjIwNDM0Nzk0OCArMDIwMApAQCAtMjQsNiAr
MjQsNyBAQAogZnVuY3Rpb24gbG9hZF91cmwoKQogewogCXZhciB1cmwgPSBkb2N1bWVudC5nZXRF
bGVtZW50QnlJZCgidG9ycmVudF91cmwiKTsKLQlmZXRjaF94bWwoIi9hY3Rpb24/bG9hZF90b3Jy
ZW50PSIgKyBlc2NhcGUodXJsLnZhbHVlKSxhY3Rpb25fb2ssYWN0aW9uX2Vycm9yKTsKKwl2YXIg
ZXVybCA9IGVzY2FwZSh1cmwudmFsdWUpOworCWZldGNoX3htbCgiL2FjdGlvbj9sb2FkX3RvcnJl
bnQ9IiArIGVzY2FwZShldXJsKSxhY3Rpb25fb2ssYWN0aW9uX2Vycm9yKTsKIAl1cmwudmFsdWUg
PSAiIjsKIH0KXCBObyBuZXdsaW5lIGF0IGVuZCBvZiBmaWxlCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>