Bug 423645 - Launching AppImage files containing spaces fails silently
Summary: Launching AppImage files containing spaces fails silently
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.71.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-29 09:21 UTC by Bernie Innocenti
Modified: 2020-06-29 10:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.72
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernie Innocenti 2020-06-29 09:21:15 UTC
SUMMARY

Looks like we have a shell escaping issue somewhere (dolphin / plasmashell / frameworks-krunner...)

STEPS TO REPRODUCE
1. Download any AppImage file to the Desktopp (example: https://www.x-plane.com/desktop/try-it/)
2. Make sure the filename contains a space
3. Double-click on the icon on the desktop

OBSERVED RESULT
 - Desktop folder view: nothing happens
 - Dolphin: asks if the file should be executed, then silently fails

The plasmashell log shows:

  /bin/sh: /home/bernie/Desktop/X-Plane: No such file or directory

Furthermore, Dolphin asks if the file should be executed, but the desktop does not.
This inconsistency is a separate bug.

EXPECTED RESULT
Should execute the app *OR* report an error

SOFTWARE/OS VERSIONS
KDE Plasma Version: built from git
KDE Frameworks Version: 5.71
Qt Version: 5.15.0
Comment 1 Bernie Innocenti 2020-06-29 09:47:32 UTC
Fixed by https://invent.kde.org/frameworks/kio/-/merge_requests/69
Comment 2 Ahmad Samir 2020-06-29 09:59:32 UTC
Git commit 8d6b306f585920230acecd19903325f6f0387b8e by Ahmad Samir, on behalf of David Faure.
Committed on 29/06/2020 at 09:58.
Pushed by ahmadsamir into branch 'master'.

OpenUrlJob: fix support for shell scripts with a space in the filename

When executing a shell script or an executable in dolphin in a folder with a blank
e.g. "/my test/test.sh" the path was truncated to "/my" and the command was not executed.

Document the API trap.
Related: bug 423412
FIXED-IN: 5.72

M  +2    -0    src/gui/commandlauncherjob.h
M  +1    -1    src/gui/openurljob.cpp

https://invent.kde.org/frameworks/kio/commit/8d6b306f585920230acecd19903325f6f0387b8e
Comment 3 Bernie Innocenti 2020-06-29 10:20:56 UTC
Thanks for the fast fix!

I'll file a separate bug for this part:

 Furthermore, Dolphin asks if the file should be executed, but the desktop does not.
 This inconsistency is a separate bug.
Comment 4 Bernie Innocenti 2020-06-29 10:36:44 UTC
Done: https://bugs.kde.org/show_bug.cgi?id=423646