https://bugzilla.wikimedia.org/show_bug.cgi?id=25403

           Summary: Problems with wfShellExec escaping for imagemagick's
                    convert
           Product: MediaWiki
           Version: unspecified
          Platform: All
               URL: https://www.hackerspace.lu/w/thumb.php?f=LightOff.svg&;
                    width=64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Images and files
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: da...@hackerspace.lu
                CC: gpaum...@wikimedia.org, bryan.tongm...@gmail.com


On our wiki, as well as on many others ([0],[1],[2],..) I've come across this
error report:


SvgHandler::rasterize: convert -background white -thumbnail 64x64\!
'/var/www/hackerspace.lu/www/w/images/4/4f/LightOff.svg'
PNG:'/var/www/hackerspace.lu/www/w/images/thumb/4/4f/LightOff.svg/64px-LightOff.svg.png'
2>&1
wfShellExec: '/var/www/hackerspace.lu/www/w/bin/ulimit4.sh' 180 102400 102400
'convert -background white -thumbnail 64x64\!
'\''/var/www/hackerspace.lu/www/w/images/4/4f/LightOff.svg'\''
PNG:'\''/var/www/hackerspace.lu/www/w/images/thumb/4/4f/LightOff.svg/64px-LightOff.svg.png'\''
2>&1'
thumbnail failed on syndi: error 1 "sh: wmf2eps: command not found
convert: Delegate failed `"wmf2eps" -o "%o" "%i"'.
convert: unable to open image `/tmp/magick-XXjbtgDb': No such file or
directory.
convert: unable to load module
`/usr/lib/ImageMagick-6.3.7/modules-Q16/coders/svg.la': file not found.
convert: UnableToOpenBlob `/tmp/magick-XXjbtgDb': No such file or directory.
convert: missing an image filename
`PNG:/var/www/hackerspace.lu/www/w/images/thumb/4/4f/LightOff.svg/64px-LightOff.svg.png'."
from "convert -background white -thumbnail 64x64\!
'/var/www/hackerspace.lu/www/w/images/4/4f/LightOff.svg'
PNG:'/var/www/hackerspace.lu/www/w/images/thumb/4/4f/LightOff.svg/64px-LightOff.svg.png'
2>&1"

Note that this is independent of the wiki version. The real problem is the last
message coming from convert. The "unable to load module" message is incorrect,
because the svg.la file is present and the path is correct.

I've tried executing the same command on the shell and it works flawlessly when
removing all of the single quotes. I think that convert is somehow interpreting
both arguments, source file and output file as a single argument due to some
erroneous escaping. (Removing one pair of "\'" from every argument works as
well)

I've not dug into the mw source for his though.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to