Fix quoted argument in emacsclient-mail.desktop (CVE-2023-27985)
authorUlrich Müller <ulm@gentoo.org>
Mon, 19 Dec 2022 15:51:20 +0000 (16:51 +0100)
committerSean Whitton <spwhitton@spwhitton.name>
Tue, 14 Mar 2023 20:26:53 +0000 (13:26 -0700)
commita7bd44852551bd9a4c04d56bac64a6ca3d9af9a3
tree7d50a1bbb8f3aa471a91a8907ec78e90e9f271c8
parent3f6e215ea8d05e2760981c8ab5bce41879e54703
Fix quoted argument in emacsclient-mail.desktop (CVE-2023-27985)

This upstream patch has been incorporated to fix the problem:

  Fix quoted argument in emacsclient-mail.desktop Exec key

  Apparently the emacsclient-mail.desktop file doesn't conform to the
  Desktop Entry Specification at
  https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
  which says about the Exec key:

  | Field codes must not be used inside a quoted argument, the result of
  | field code expansion inside a quoted argument is undefined.

  However, the %u field code is used inside a quoted argument of the
  Exec key in both the [Desktop Entry] and [Desktop Action new-window]
  sections.
  * etc/emacsclient-mail.desktop (Exec): The Desktop Entry
  Specification does not allow field codes like %u inside a quoted
  argument. Work around it by passing %u as first parameter ($1)
  to the shell wrapper.
  * etc/emacsclient.desktop (Exec): Use `sh` rather than `placeholder`
  as the command name of the shell wrapper.  (Bug#60204)

Origin: upstream, commit d32091199ae5de590a83f1542a01d75fba000467
Bug: https://debbugs.gnu.org/60204
Bug-Debian: https://bugs.debian.org/1032538
Forwarded: not-needed
etc/emacsclient-mail.desktop
etc/emacsclient.desktop