Package: mime-support
Version: 3.54
Followup-For: Bug #745141

The mutt manual at <http://www.mutt.org/doc/manual/manual.html#toc5.3>
says this:
> Keep the %-expandos away from shell quoting. Don't quote them with
> single or double quotes. Mutt does this for you, the right way, as
> should any other program which interprets mailcap. Don't put them into
> backtick expansions.

This was already discussed on debian-users in 2005:
<https://lists.debian.org/debian-user/2005/04/msg01185.html>

The mailcap RFC <http://www.faqs.org/rfcs/rfc1524.html> does not mention
any quoting rule for %s, but specifies the following:
> On a UNIX system, such commands will each be a full shell command
> line, including the path name for a program and its arguments.
> (Because of differences in shells and the implementation and behavior
> of the same shell from one system to another, it is specified that the
> command line be intended as input to the Bourne shell, i.e., that it
> is implicitly preceded by "/bin/sh -c " on the command line.)

Considering that there are two quoting formats in shell, a program using
mailcap would still need to know how to correctly pass the filename:
- if singe quotes are used, a single quote in the file name itself would
  need to be encoded as '\''.
- if double quotes are used, a double quote, dollar sign and back-ticks
  would still needed to be escaped.
As such only the calling application can do it right and properly escape
the filename itself for shell use and only then replace the %s with
that.

So I'm all for not putting quotes in the mailcap file itself but put the
burden on those programs using it.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13.9 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

mime-support depends on no packages.

Versions of packages mime-support recommends:
ii  file  1:5.17-1

mime-support suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to