https://bugs.kde.org/show_bug.cgi?id=510968
Bug ID: 510968
Summary: Environment variables starting without digits are not
filtered
Classification: Frameworks and Libraries
Product: frameworks-kio
Version First 6.19.0
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
Created attachment 186046
--> https://bugs.kde.org/attachment.cgi?id=186046&action=edit
test case, sets env 0 and then runs a bash shell
SUMMARY
When launching a process with xdg-open via kio's systemd process launcher,
environment variables whose names are not made of [a-zA-Z0-9_]* are filtered to
fit systemd unit files[1]; but systemd has an additional restriction that
environment variables not start with digits[2]. If an environment variable like
"0a" is set, the process will fail to launch.
STEPS TO REPRODUCE
1. Set an environment variable starting with "0". (Ex: setenv.c)
2. Run xdg-open somefile.png
OBSERVED RESULT
kf.kio.gui: Failed to launch process as service: "app-firefox@[...].service"
"org.freedesktop.DBus.Error.InvalidArgs" "Invalid environment block."
EXPECTED RESULT
The environment should be filtered alongside other illegal systemd environment
variables.
SOFTWARE/OS VERSIONS
Operating System: NixOS 25.05
KDE Plasma Version: 6.3.6
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.1
xdg-utils 1.2.1
kio-6.14.0
ADDITIONAL INFORMATION
[1]
https://invent.kde.org/frameworks/kio/-/blob/67fa68b82e1795f636936b4f77623d0146f2ee8e/src/gui/systemd/systemdprocessrunner.cpp#L94
[2]
https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#Environment=
--
You are receiving this mail because:
You are watching all bug changes.