From 968566745aafe13f6688c554464c2cba5dcb0767 Mon Sep 17 00:00:00 2001 From: ywarnier Date: Wed, 28 Feb 2007 19:44:51 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20bug=20#18880=20-=20Encryption=20des=20mot?= =?UTF-8?q?s=20de=20passe=20active=20la=20v=E9rification=20encrypt=E9e=20m?= =?UTF-8?q?ais=20n'encrypte=20rien=20+=20d=E9sactivation=20de=20l'option?= =?UTF-8?q?=20inverse=20de=20d=E9cryption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/security.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 97eb4d8a5a6..cc32a07d253 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -53,12 +53,16 @@ if ($_GET["action"] == 'setgeneraterule') if ($_GET["action"] == 'activate_encrypt') { dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1"); + $sql = "UPDATE ".MAIN_DB_PREFIX."user as u SET u.pass = MD5(u.pass)"; + $result = $db->query($sql); Header("Location: security.php"); exit; } else if ($_GET["action"] == 'disable_encrypt') { - dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED"); + //On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas être décodés + //Do not allow "disable encryption" as passwords cannot be decrypted + //dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED"); Header("Location: security.php"); exit; } @@ -187,7 +191,9 @@ if($conf->global->DATABASE_PWD_ENCRYPTED == 0) } else if($conf->global->DATABASE_PWD_ENCRYPTED == 1) { - print ''.$langs->trans("Disable").''; + //On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas être décodés + //Do not allow "disable encryption" as passwords cannot be decrypted + //print ''.$langs->trans("Disable").''; } print "";