';
}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index a519d4b92bf..c86874cdde9 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1901,7 +1901,7 @@ class Form
// check parameters
$price_level = (! empty($price_level) ? $price_level : 0);
if (is_null($ajaxoptions)) $ajaxoptions=array();
-
+
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT))
{
$placeholder='';
@@ -7204,7 +7204,7 @@ class Form
if ($object->photo) $ret.=" \n";
$ret.='
';
if ($object->photo) $ret.='
'.$langs->trans("Delete").'
';
- $ret.='
';
+ $ret.='
';
$ret.='
';
}
}
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 8893626156b..e0c2afd7e34 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1079,7 +1079,7 @@ SystemInfoDesc=System information is miscellaneous technical information you get
SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction.
CompanyFundationDesc=Edit the information of the company/entity. Click on "%s" or "%s" button at the bottom of the page.
AccountantDesc=Edit the details of your accountant/bookkeeper
-AccountantFileNumber=File number
+AccountantFileNumber=Accountant code
DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here.
AvailableModules=Available app/modules
ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules).
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index 479604ddc36..926cb50836e 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -423,8 +423,20 @@ if (empty($reshook)) {
if (GETPOST('deletephoto')) {
$object->photo = '';
}
- if (!empty($_FILES['photo']['name'])) {
- $object->photo = dol_sanitizeFileName($_FILES['photo']['name']);
+ if (!empty($_FILES['photo']['name']))
+ {
+ $isimage=image_format_supported($_FILES['photo']['name']);
+ if ($isimage > 0)
+ {
+ $object->photo = dol_sanitizeFileName($_FILES['photo']['name']);
+ }
+ else
+ {
+ $error++;
+ $langs->load("errors");
+ setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
+ dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_INFO);
+ }
}
if (!$error) {