diff --git a/htdocs/includes/modules/facture/modules_facture.php b/htdocs/includes/modules/facture/modules_facture.php index 98df8f3fc1e..e8e7dba1c30 100644 --- a/htdocs/includes/modules/facture/modules_facture.php +++ b/htdocs/includes/modules/facture/modules_facture.php @@ -154,9 +154,11 @@ function facture_meta_create($db, $facid, $message="") if ($conf->facture->dir_output) { - $dir = $conf->facture->dir_output . "/" . $fac->ref ; - $file = $dir . "/" . $fac->ref . ".meta"; - + $forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","="); + $facref = str_replace($forbidden_chars,"_",$fac->ref); + $dir = $conf->facture->dir_output . "/" . $facref ; + $file = $dir . "/" . $facref . ".meta"; + if (! file_exists($dir)) { umask(0); diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index a69cde78ebb..901e313b4b5 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -382,7 +382,7 @@ class Propal $this->total_ttc = $obj->total; $this->socidp = $obj->fk_soc; $this->soc_id = $obj->fk_soc; - $this->projet_id = $obj->fk_projet; + $this->projetidp = $obj->fk_projet; $this->contactid = $obj->fk_soc_contact; $this->modelpdf = $obj->model_pdf; $this->note = $obj->note;