Bug 248682 - kfmclient/kioclient application launch fails if '|' character used in URL
Summary: kfmclient/kioclient application launch fails if '|' character used in URL
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 307587 326831 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-22 11:06 UTC by jhart
Modified: 2013-11-09 21:05 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jhart 2010-08-22 11:06:06 UTC
Version:           unspecified (using KDE 4.4.4) 
OS:                Linux

I am trying to get konqueror & google chrome to properly handle ed2k:// links.  This was working correctly on a previous version of KDE (openSUSE 11.2) and has broken since upgrading to openSUSE 11.3.

I have a debugging ed2k.protocol handler installed; this protocol handler runs a script that will dump its input into a file in my home directory (for testing).

Issuing the command "kioclient exec ed2k://an.ed2k.link" results in the correct string "ed2k://an.ed2k.link" being written to the dump file.

Issuing the command "kioclient exec ed2k://|file|this.is.a.broken.ed2k.link" results in an error message popup "Malformed URL ed2k:"

The problem is the pipe character "|" -- any URL string containing this character will result in the Malformed URL popup.  This ensures all ed2k links fail, since they use the pipe character as a field separator, e.g. "ed2k://|file|...filename...|filesize|hash|"


Reproducible: Always

Steps to Reproduce:
Issue the command "kioclient exec ed2k://|file|this.is.a.broken.ed2k.link" from the command line.

Actual Results:  
Popup dialog "Malformed URL ed2k:"

Expected Results:  
Executed the debugging ed2k.protocol handler and written string "ed2k://|file|this.is.a.broken.ed2k.link" to the output file.
Comment 1 Jekyll Wu 2010-09-16 05:47:42 UTC
I can confirm this. 

Actually, my result is even worse. kioclient treat ANY ed2k link as malformed URL.

Open http://www.gruk.org/list.php with konqueror, right click on any ed2k links and choose copying its location, and the result is only "ed2k:/" . 

I am using konqueror 4.5.1 on KDE SC 4.5.1, archlinux .
Comment 2 David Faure 2010-10-15 23:44:25 UTC
The issue is that hostnames with a '|' in them are invalid. QUrl implements STD3 hostname checking, and therefore these hostnames make the url invalid (this is why you only see the scheme).

See http://www.faqs.org/rfcs/rfc3987.html for more details.

I tried arguing the case with the QUrl maintainer (Thiago) about making it more tolerant, but as he says, RFCs exist so that apps can interoperate, if you violate it then the apps stop working. This has to be taken up with the eDonkey people, I assume, so that they use valid URLs.
Comment 3 Dawit Alemayehu 2012-10-05 14:10:16 UTC
*** Bug 307587 has been marked as a duplicate of this bug. ***
Comment 4 Dawit Alemayehu 2013-11-09 17:59:22 UTC
*** Bug 326831 has been marked as a duplicate of this bug. ***
Comment 5 envite 2013-11-09 21:05:04 UTC
What happened to "Be liberal on what you accept" side of the saying? You should be strict only on what you send.

You should not do this check, but instead relay on the receiving app doing its own check. This is grossely affecting ed2k apps users in KDE, making them unable to "just click". See 326831.