display command in /etc/mailcap needs quote escaping

Bug #1077505 reported by Waldir Pimenta
6
This bug affects 1 person
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/mime/packages/imagemagick file in the deb package)
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.types"...
 - 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.

Revision history for this message
broucaries (roucaries-bastien+bugs) wrote :

Newer version are fixed

Changed in imagemagick (Ubuntu):
status: New → Fix Released
Revision history for this message
broucaries (roucaries-bastien+bugs) wrote :
Changed in imagemagick (Ubuntu):
assignee: nobody → broucaries (roucaries-bastien+bugs)
Changed in imagemagick (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.