From c24a95b7ad11322eede188e630ac8b38e1ca631c Mon Sep 17 00:00:00 2001 From: atm-josselin Date: Mon, 1 Jul 2019 09:31:01 +0200 Subject: [PATCH] Sanitize at creation of the product instead of the creation of the filepath --- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/product/class/product.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 522804b601c..679989a75a0 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -764,7 +764,7 @@ class FormFile // Show file name with link to download $out.= ''; - $out.= 'ref = dol_string_nospecial(trim($this->ref)); + $this->ref = dol_sanitizeFileName(dol_string_nospecial(trim($this->ref))); $this->label = trim($this->label); $this->price_ttc=price2num($this->price_ttc); $this->price=price2num($this->price);