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)
committerRob Browning <rlb@defaultvalue.org>
Sat, 13 May 2023 20:17:27 +0000 (21:17 +0100)
commit43e3bc3e3480bd32f08cc6a0c1d5f76fb5a46be4
treef0a717c4fd75f5b10ad8f16f96cd38eccc5e7f9f
parentad98f906d0decd27260dc4d7caf35d74f2f8db24
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

Gbp-Pq: Name 0024-Fix-quoted-argument-in-emacsclient-mail.desktop-CVE-.patch
etc/emacsclient-mail.desktop
etc/emacsclient.desktop