display command in /etc/mailcap needs quote escaping
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
imagemagick (Debian) |
Fix Released
|
Unknown
|
|||
imagemagick (Ubuntu) |
Fix Released
|
Undecided
|
broucaries |
Bug Description
I am not sure how, but apparently the line
image/png; display png:'%s'; test=test -n "$DISPLAY"; priority=2
(line 22 of the usr/lib/
becomes:
image/png; display 'png:'%s''; test=test -n "$DISPLAY"
in /etc/mailcap, as revealed by the command cat /etc/mailcap | grep "png".
The problem is the nested single quote symbols; the inner ones are not escaped so this results in a parsing error when running the command
see image.png
which results in:
sh: 1: Syntax error: Unterminated quoted string
Warning: program returned non-zero exit code #2
Running "see" with the --debug option returns:
- parsing parameter "image.png"
- Reading mime.types file "/etc/mime.
- extension "png" maps to mime-type "image/png"
- Reading mailcap file "/etc/mailcap"...
Processing file "image.png" of type "image/png" (encoding=none)...
- checking mailcap entry "image/png; display 'png:'%s''; test=test -n "$DISPLAY""
- program to execute: display 'png:'%s''
- running test: test -n "$DISPLAY" (result=0=true)
- executing: display 'png:'image.png'
sh: 1: Syntax error: Unterminated quoted string
Warning: program returned non-zero exit code #2
This is not exclusive of the png format; all the invocations of the display command in /etc/mailcap have the same problem.
Changed in imagemagick (Debian): | |
status: | Unknown → Fix Released |
Newer version are fixed