Index: security.php =================================================================== RCS file: /sources/dolibarr/dolibarr/htdocs/admin/security.php,v retrieving revision 1.9 diff -u -r1.9 security.php --- security.php 23 Nov 2006 23:54:56 -0000 1.9 +++ security.php 26 Feb 2007 00:09:34 -0000 @@ -53,12 +53,16 @@ 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 @@ } 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 "";