Bug 455302 - Seat names in multiseat configurations are injected directly into dbus paths, leading to assertion failures and ugly crashes.
Summary: Seat names in multiseat configurations are injected directly into dbus paths,...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Screen locking (show other bugs)
Version: 6.2.4
Platform: Ubuntu Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 455204 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-15 04:08 UTC by vespian
Modified: 2024-12-18 19:02 UTC (History)
2 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 vespian 2022-06-15 04:08:09 UTC
SUMMARY
Dbus paths must match the "[A-Z][a-z][0-9]_" regexp [1]. OTOH hand it is allowed to create seat names like 'seat-foo' which leads to ugly assertion errors in kde applications when doing DBUS calls that involve such paths. 

kscreenlocker is just one of the components effected, another is plasmashell which kickoff somehow referes to. Please feel free to move this bugreport accordingly.

[1] https://dbus.freedesktop.org/doc/dbus-specification.html, section "Valid Object Paths".

STEPS TO REPRODUCE
1. create a seat that contains e.g. '-' in the name
2. login to this seat
3. just try searching something in kickoff menu, or lock a screen and the component will crash

Alternative is to simply do a dbus call that e.g. kickoff is doing when searching for something in the menu:
```"""
dbus-send --print-reply --dest=org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat-ves org.freedesktop.DBus.Introspectable.Introspect
"""

OBSERVED RESULT

Components crashing

EXPECTED RESULT

Unsupported DBUS paths should be validated and errors should be logged or preferably a warning should be shown to the user stating that the name of the seat is invalid. 

I do not have a context wrt. why assertions in the code are made instead, but IMO handling this error gracefully could help novice users debug this problem in the future.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: see the form data I entered
Qt Version: 5.15.3

System is stock Ubuntu 22.04 LTS.

ADDITIONAL INFORMATION
Comment 1 vespian 2022-06-15 04:09:40 UTC
See also https://bugs.kde.org/show_bug.cgi?id=455204#c1
Comment 2 Akseli Lahtinen 2024-05-30 11:09:09 UTC
*** Bug 455204 has been marked as a duplicate of this bug. ***