Bug 444720 - unintentional execution of commands
Summary: unintentional execution of commands
Status: CONFIRMED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.23.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Lohnau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-31 14:26 UTC by Franz Trischberger
Modified: 2021-12-10 13:15 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Trischberger 2021-10-31 14:26:04 UTC
SUMMARY
When you mistype a command and hit [enter] on an empty list, then correct the error, krunner executes blindly some random command that's in the results.


STEPS TO REPRODUCE
I have musescore [application] installed.
Also a MuseScore3 folder exists under documents that contains recently opened documents.
now:
1. Type muse
2. inspect the command list. Here: [applications: musescore; recent documents: ...some musescore files ...]
    the application is first in the list.
3. type another e [input now is: musee]
4. wait for the list going empty, then hit enter
5. Press [backspace]

OBSERVED RESULT
Immediately krunner disappears and dolphin is getting launched (in my case) with the MuseScore3 folder open.

EXPECTED RESULT
krunner shouldnt't execute anything in this case but just update the possible commands.
Comment 1 Whtyger 2021-12-10 13:15:54 UTC
I can add some more details on this bug. It is reproducible even easier:
1. Start krunner.
2. Press 'Enter' in empty field.
3. Press 'g' -- and immediately Gwenview is launched.
So this 'Enter' keypress is somehow stored and launches the first application that would have been in the list, if the letter was typed without step 2. I.e. if I run Krunner and type 'e', it shows me 'Choose emoticon theme' in the top of the list. Now if I reproduce step 1, then 2 and then press 'e' instead of 'g' -- Emoticons chooser will be launched.
Moreover, if I run Krunner, press 'Enter' and close it, this keypress stays stored somewhere and on the next start of Krunner on the first typed letter it will run the application which corresponds the search with this letter. That's weird.

EXPECTED RESULT
'Enter' keypress should be flushed somehow to prevent accidental launches.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 20.04 (64-bit)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8