- An error when writing an error message, e.g. EPIPE, no longer causes
recursion until the stack is exhausted.
- rcvdist(1) now passes switch arguments to post(8).
+- The uses of %{charset} in mhn.defaults were wrapped with double quotes.
-------------------
DEPRECATED FEATURES
####
cat <<EOF >>${TMP}
mhbuild-convert-text/calendar: mhical -infile %F -contenttype
-mhbuild-convert-text: charset=%{charset}; iconv -f \${charset:-us-ascii} -t utf-8 %F${replfmt}
+mhbuild-convert-text: charset="%{charset}"; iconv -f "\${charset:-us-ascii}" -t utf-8 %F${replfmt}
mhbuild-disposition-text/calendar: inline
mhbuild-disposition-message/rfc822: inline
EOF
# that another netscape is already running and certain things can't be done).
PGM=`$SEARCHPROG "$SEARCHPATH" w3m`
if [ ! -z "$PGM" ]; then
- echo 'mhshow-show-text/html: charset=%{charset}; '"\
+ echo 'mhshow-show-text/html: charset="%{charset}"; '"\
%l$PGM"' -dump ${charset:+-I} ${charset:+"$charset"} -T text/html %F' >> $TMP
- echo 'mhfixmsg-format-text/html: charset=%{charset}; '"\
+ echo 'mhfixmsg-format-text/html: charset="%{charset}"; '"\
$PGM "'-dump ${charset:+-I} ${charset:+"$charset"} -O utf-8 -T text/html %F' \
>> $TMP
- echo 'mhbuild-convert-text/html: charset=%{charset}; '"\
+ echo 'mhbuild-convert-text/html: charset="%{charset}"; '"\
$PGM "'-dump ${charset:+-I} ${charset:+"$charset"} -O utf-8 -T text/html %F '"\
${replfmt}" >> $TMP
else
PGM=`$SEARCHPROG "$SEARCHPATH" lynx`
if [ ! -z "$PGM" ]; then
- echo 'mhshow-show-text/html: charset=%{charset}; '"\
+ echo 'mhshow-show-text/html: charset="%{charset}"; '"\
%l$PGM"' -child -dump -force-html ${charset:+--assume_charset} ${charset:+"$charset"} %F' >> $TMP
#### lynx indents with 3 spaces, remove them and any trailing spaces.
- echo 'mhfixmsg-format-text/html: charset=%{charset}; '"\
+ echo 'mhfixmsg-format-text/html: charset="%{charset}"; '"\
$PGM "'-child -dump -force_html ${charset:+--assume_charset} ${charset:+"$charset"} %F | '"\
expand | sed -e 's/^ //' -e 's/ *$//'" >> $TMP
- echo 'mhbuild-convert-text/html: charset=%{charset}; '"\
+ echo 'mhbuild-convert-text/html: charset="%{charset}"; '"\
$PGM "'-child -dump -force_html ${charset:+--assume_charset} ${charset:+"$charset"} '"\
%F${replfmt}" >> $TMP
else
the next display string.
.PP
The {parameter} escape is typically used in a command line argument
-that should only be present if it has a non-null value. Its value
-will be wrapped with single quotes if the escape is not so wrapped.
+that should only be present if it has a non-null value. It is highly
+recommended that the entire escape be wrapped in double quotes.
Shell parameter expansion can construct the argument only when it is
non-null, e.g.,
.PP
.RS 5
.nf
-mhshow-show-text/html: charset=%{charset};
+mhshow-show-text/html: charset="%{charset}";
w3m ${charset:+-I $charset} -T text/html %F
.fi
.RE
run_prog mhshow last >"$actual" 2>&1
check "$expected" "$actual" : parameter value quoting with text following
+# check malicious parameter value quoting
+msgfile=`mhpath new`
+msgnum=`basename $msgfile`
+cat >"$msgfile" <<'EOF'
+Subject: shows difficulty of quoting with /bin/sh -c
+MIME-Version: 1.0
+Content-Type: text/html; charset="oops'; echo should not see this!"
+
+EOF
+
+cat >"$expected" <<EOF
+[ part - text/html - 0B ]
+EOF
+
+run_prog mhshow -noheader -form mhl.null last >"$actual" 2>&1
+check "$expected" "$actual" : malicious parameter value quoting
+
#
# test a large file that needs to be converted to UTF-8
#