| Summary: | kde-open/xdg-open does not handle symbols at start or end of schema URL | ||
|---|---|---|---|
| Product: | [Plasma] kde-cli-tools | Reporter: | Matt O <matt> |
| Component: | general | Assignee: | Aleix Pol <aleixpol> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | CC: | a.samirh78, faure, kdelibs-bugs-null, matt, rdieter |
| Priority: | NOR | ||
| Version First Reported In: | 5.16.90 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Matt O
2018-11-13 19:01:50 UTC
Can you test with kde5-open only instead? that will help Thanks for the response. I believe you mean kde-open5 (let me know if you are referring to something else) Here are the results of several tests: kde-open5 --version kioclient 5.12.6 kde-open5 test://example-- kf5.kio.widgets: KRun(0x5651178bdc60) ERROR (stat): 114 "Unknown host test: Host not found" kde-open --version Qt: 4.8.7 KDE Development Platform: 4.14.38 KIO Client: 2.0 kde-open test://example-- Malformed URL test: xdg-open --version xdg-open 1.1.2 xdg-open test://example-- kf5.kio.widgets: KRun(0x55b0ec356a10) ERROR (stat): 114 "Unknown host test: Host not found" /usr/lib/node_modules/angular-cli/node_modules/opn/xdg-open --version xdg-open 1.1.0 rc3 /usr/lib/node_modules/angular-cli/node_modules/opn/xdg-open test://example-- kf5.kio.widgets: KRun(0x55991c81cb30) ERROR (stat): 114 "Unknown host test: Host not found" ---------- In all of these cases, the error message is returned from KIO, either via the terminal, an alert window, or both. In all cases, if I use "test://example" instead of "test://example--", a different and proper error message is returned. The correct error message indicates that there is no handler registered for "test". The incorrect message always gives an error that indicates that "test" is being interpreted as a hostname, as opposed to a protocol. Looks like it's a bug in ClientApp::kde_open() [1]:
for "test://example" info.url is QUrl("test://example")
for "test://example--" info.url is QUrl("http://test//example--")
[1] https://cgit.kde.org/kde-cli-tools.git/tree/kioclient/kioclient.cpp#n212
I think that's because the "--" is invalid hostname. That's QUrl's behaviour itself, i.e. it comes from Qt. This has to do with the IDNA "standard", see http://www.rfc-editor.org/rfc/rfc3490.txt I don't believe this is a kde-open bug in any form. You can try playing with QUrl and filing a Qt bug, but I think the answer will be that your URL is not IDNA-conform. So better find a different solution than the "--" thing. |