As the original author of the run-mailcap program, this hack to bypass the check for shell meta-characters when called as "open" is DANGEROUS! It allows the execution of arbitrary commands on a victim's computer with a specially crafted filename if there is an mailcap entry with an improperly quoted "%s" (and let's face it -- there is no proper quoting that will handle all cases). It was such an entry (in qpdfview) that led to the discovery of this problem.
I suspect this extra condition was added at a time when the mailcap package was missing a dependency on the package providing bin/mktemp, something I believe has been fixed. The upstream Debian package does not have this extra condition. https://salsa.debian.org/debian/mailcap/-/blob/master/run-mailcap#L480 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1961600 Title: "open" command crashes when filename as space in it To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mailcap/+bug/1961600/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs