Bug#701849: kde-runtime: kde-open cannot be used to open applications that take an URI where the host field isn't a DNS name.
Package: kde-runtime
Version: 4:4.8.4-2
Severity: normal
Dear Maintainer,
*** Please consider answering these questions, where appropriate ***
(Ok, as usual bullshit - but I'll answer the questions):
* What led up to the situation?
I wanted to be able to click on "teleport" on the monitor
of one PC and then teleport in SL in the viewer running on
another PC.
* What exactly did you do (or not do) that was effective (or
ineffective)?
I linked the sheme "secondlife:" to my second life viewer.
When clicking on a teleport link (ie on this page:
http://slurl.com/secondlife/Hippo%20Hollow/172/222/43 )
* What was the outcome of this action?
A pop-up appears saying that "secondlife:/172/222/43" is malformed.
* What outcome did you expect instead?
I except to teleport (inside the SL viewer) to that location.
*** End of the template - remove these lines ***
Now the real info:
my browser (chrome) calls xdg-open which calls, kde-open (I run KDE)
with the URL:
"secondlife://Hippo%20Hollow/172/222/43"
open-kde calls 'bool ClientApp::kde_open(const KUrl& url, const QString& mimeType, bool allowExec)'
where the url is still "secondlife://Hippo%20Hollow/172/222/43"
(although I only managed to print it like that with:
QTextStream(stderr) << QUrl::toPercentEncoding(url.toEncoded(), ":/", "") << '\n';
It then creates a KRun, which only accepts a KUrl, derived from QUrl.
Upon exec() this somewhere calls QUrl::isValid(), which returns
false. My guess is that this is because it checks the host part of
the URL to be conforming a DNS name (which may not contain %20,
or spaces), or because the url at that moment contains a space
instead of a %20 and a space is not a legal character in an URL.
On top of that, if you try to PRINT a KUrl with a space in the
hostname, the whole hostname is omitted (this is certainly a bug,
too, but a separate one).
As the documentation of QUrl states that it conforms to
http://www.rfc-editor.org/rfc/rfc3986.txt
Quoting Scott Lawrence, open source manage of Linden Lab:
"secondlife://Hippo%20Hollow/172/222/43" is a perfectly legal url.
The interpretation of the rest of a url is entirely dependent on the
scheme. It is widely believed but untrue that the domain part of the
url must be a dns name.
As we can find in RFC 3986:
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
hier-part = "//" authority path-abempty
authority = [ userinfo "@" ] host [ ":" port ]
host = IP-literal / IPv4address / reg-name
reg-name = *( unreserved / pct-encoded / sub-delims )
pct-encoded = "%" HEXDIG HEXDIG
and Hippo%20Hollow is legal.
-- System Information:
Debian Release: 7.0
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages kde-runtime depends on:
ii kde-runtime-data 4:4.8.4-2
ii kdelibs5-plugins 4:4.8.4-4
ii libasound2 1.0.25-4
ii libattica0 0.2.0-1
ii libc6 2.13-37
ii libcanberra0 0.28-6
ii libexiv2-12 0.23-1
ii libgcc1 1:4.7.2-5
ii libjpeg8 8d-1
ii libkcmutils4 4:4.8.4-4
ii libkdeclarative5 4:4.8.4-4
ii libkdecore5 4:4.8.4-4
ii libkdesu5 4:4.8.4-4
ii libkdeui5 4:4.8.4-4
ii libkdewebkit5 4:4.8.4-4
ii libkdnssd4 4:4.8.4-4
ii libkemoticons4 4:4.8.4-4
ii libkfile4 4:4.8.4-4
ii libkhtml5 4:4.8.4-4
ii libkidletime4 4:4.8.4-4
ii libkio5 4:4.8.4-4
ii libkmediaplayer4 4:4.8.4-4
ii libknewstuff3-4 4:4.8.4-4
ii libknotifyconfig4 4:4.8.4-4
ii libkparts4 4:4.8.4-4
ii libkpty4 4:4.8.4-4
ii libnepomuk4 4:4.8.4-4
ii libnepomukquery4a 4:4.8.4-4
ii libntrack-qt4-1 016-1.1
ii libopenexr6 1.6.1-6
ii libphonon4 4:4.6.0.0-3
ii libplasma3 4:4.8.4-4
ii libpulse-mainloop-glib0 2.0-6
ii libpulse0 2.0-6
ii libqt4-dbus 4:4.8.2+dfsg-10
ii libqt4-declarative 4:4.8.2+dfsg-10
ii libqt4-network 4:4.8.2+dfsg-10
ii libqt4-script 4:4.8.2+dfsg-10
ii libqt4-svg 4:4.8.2+dfsg-10
ii libqt4-xml 4:4.8.2+dfsg-10
ii libqtcore4 4:4.8.2+dfsg-10
ii libqtgui4 4:4.8.2+dfsg-10
ii libqtwebkit4 2.2.1-5
ii libsmbclient 2:3.6.6-5
ii libsolid4 4:4.8.4-4
ii libsoprano4 2.7.6+dfsg.1-2
ii libssh-4 0.5.4-1
ii libstdc++6 4.7.2-5
ii libstreamanalyzer0 0.7.7-3
ii libstreams0 0.7.7-3
ii libx11-6 2:1.5.0-1
ii libxcursor1 1:1.1.13-1
ii oxygen-icon-theme 4:4.8.4-1
ii perl 5.14.2-16
ii phonon 4:4.6.0.0-2
ii plasma-scriptengine-javascript 4:4.8.4-2
ii shared-desktop-ontologies 0.10.0-1
Versions of packages kde-runtime recommends:
ii virtuoso-minimal 6.1.4+dfsg1-1
Versions of packages kde-runtime suggests:
pn djvulibre-bin <none>
ii finger 0.17-15
pn icoutils <none>
-- no debconf information
Reply to: