diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php
index f016c305a15..d9d61673c5e 100644
--- a/htdocs/admin/security.php
+++ b/htdocs/admin/security.php
@@ -168,9 +168,9 @@ elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK')
exit;
}
-if ($action == 'maj_pattern')
+if ($action == 'updatepattern')
{
- $pattern = GETPOST("pattern");
+ $pattern = GETPOST("pattern", "alpha");
$explodePattern = explode(';', $pattern);
$patternInError = false;
@@ -184,6 +184,7 @@ if ($action == 'maj_pattern')
if (!$patternInError) {
dolibarr_set_const($db, "USER_PASSWORD_PATTERN", $pattern, 'chaine', 0, '', $conf->entity);
+ setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
header("Location: security.php");
exit;
}
@@ -336,11 +337,9 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso") {
print '';
print '
';
- print '
| ';
+ print ' ';
print ''.$langs->trans("Save").'';
- print ' |