[kmail2] [Bug 489834] New: Action opening attachment fails with "Invalid environment block." due to environment variable of third party software

Alexander bugzilla_noreply at kde.org
Sat Jul 6 16:39:39 BST 2024


https://bugs.kde.org/show_bug.cgi?id=489834

            Bug ID: 489834
           Summary: Action opening attachment fails with "Invalid
                    environment block." due to environment variable of
                    third party software
    Classification: Applications
           Product: kmail2
           Version: 6.1.1
          Platform: openSUSE
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: commands and actions
          Assignee: kdepim-bugs at kde.org
          Reporter: cookie170 at web.de
  Target Milestone: ---

SUMMARY
openSUSE Tumbleweed, up-to-date. Wayland session. A software called midnight
commander is installed. I sets an environment variable 

BASH_FUNC_mc%%=() {  . /usr/share/mc/mc-wrapper.sh
}
_=/usr/bin/printenv

This may or maybe not posix conform. But since update to a recent version of
Plasma6 this variable prevents kmail from opening an attachment. OK, after
reading this sentence again, I have to admit that I guess that the variable is
the cause for the kmail malfunction. However, after I uninstalled mc, kmail
works as expected.

After starting kmail on command line and clicking on an attachment in kmail to
make it open a pdf e.g.,  the error message there is:

kf.kio.gui: Failed to launch process as service:
"app-org.kde.okular at 6af406497e054a04a6adc583bf0242da.service"
"org.freedesktop.DBus.Error.InvalidArgs" "Invalid environment block."

STEPS TO REPRODUCE
1. Install midnight commander
2. reboot
3. open kmail and try to open an attachment to an email, a pdf e.g.

I reported that bug here as well
https://bugzilla.opensuse.org/show_bug.cgi?id=1227388

I regard that behaviour of kmail as a bug, because even the environment
variable set by mc is somehow wrong, kmail should be immune to such errors.
Besides that, isn't this even a security risk, if any other software which sets
a wrong variable can cause kmail to malfunction?

OBSERVED RESULT
Error message

EXPECTED RESULT
Okular opens displaying attached pdf

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 

Operating System: openSUSE Tumbleweed 20240704
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.7-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kdepim-bugs mailing list