Bug 455204 - 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: RESOLVED DUPLICATE of bug 455302
Alias: None
Product: plasmashell
Classification: Plasma
Component: generic-crash (show other bugs)
Version: 5.24.4
Platform: Ubuntu Linux
: NOR crash
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-13 08:33 UTC by vespian
Modified: 2024-05-30 11:09 UTC (History)
5 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-13 08:33:44 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 Nate Graham 2022-06-14 17:18:28 UTC
Please file another bug report for ksreenlocker. Thanks!
Comment 2 vespian 2022-06-15 04:08:46 UTC
Done: https://bugs.kde.org/show_bug.cgi?id=455302
Comment 3 Akseli Lahtinen 2024-05-30 11:09:09 UTC
*** This bug has been marked as a duplicate of bug 455302 ***