Correct bug #3050
when a piece is in draft and odt2pdf.sh is used, the filename is not corrected escaped for the shell
This commit is contained in:
parent
ba984254a5
commit
efd3c4d863
@ -489,11 +489,11 @@ IMG;
|
|||||||
$name=preg_replace('/\.odt/i', '', $name);
|
$name=preg_replace('/\.odt/i', '', $name);
|
||||||
if (!empty($conf->global->MAIN_DOL_SCRIPTS_ROOT))
|
if (!empty($conf->global->MAIN_DOL_SCRIPTS_ROOT))
|
||||||
{
|
{
|
||||||
$command = $conf->global->MAIN_DOL_SCRIPTS_ROOT.'/scripts/odt2pdf/odt2pdf.sh '.$name.' '.(is_numeric($conf->global->MAIN_ODT_AS_PDF)?'jodconverter':$conf->global->MAIN_ODT_AS_PDF);
|
$command = $conf->global->MAIN_DOL_SCRIPTS_ROOT.'/scripts/odt2pdf/odt2pdf.sh '.escapeshellcmd($name).' '.(is_numeric($conf->global->MAIN_ODT_AS_PDF)?'jodconverter':$conf->global->MAIN_ODT_AS_PDF);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$command = '../../scripts/odt2pdf/odt2pdf.sh '.$name.' '.(is_numeric($conf->global->MAIN_ODT_AS_PDF)?'jodconverter':$conf->global->MAIN_ODT_AS_PDF);
|
$command = '../../scripts/odt2pdf/odt2pdf.sh '.escapeshellcmd($name).' '.(is_numeric($conf->global->MAIN_ODT_AS_PDF)?'jodconverter':$conf->global->MAIN_ODT_AS_PDF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user