Fix length of hidden password

This commit is contained in:
Laurent Destailleur 2018-06-24 11:45:10 +02:00
parent 5819333b80
commit 25b1d063ae
2 changed files with 2 additions and 2 deletions

View File

@ -1717,7 +1717,7 @@ class ExtraFields
} }
elseif ($type == 'password') elseif ($type == 'password')
{ {
$value=preg_replace('/./i','*',$value); $value=dol_trunc(preg_replace('/./i','*',$value), 8, 'right', 'UTF-8', 1);
} }
else else
{ {

View File

@ -129,7 +129,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element]
print '</td>'; print '</td>';
$html_id = !empty($object->id) ? $object->element.'_extras_'.$key.'_'.$object->id : ''; $html_id = !empty($object->id) ? $object->element.'_extras_'.$key.'_'.$object->id : '';
print '<td id="'.$html_id.'" class="'.$object->element.'_extras_'.$key.'" colspan="'.$cols.'">'; print '<td id="'.$html_id.'" class="'.$object->element.'_extras_'.$key.'"'.($cols?' colspan="'.$cols.'"':'').'>';
// Convert date into timestamp format // Convert date into timestamp format
if (in_array($extrafields->attributes[$object->table_element]['type'][$key], array('date','datetime'))) if (in_array($extrafields->attributes[$object->table_element]['type'][$key], array('date','datetime')))