diff --git a/awstats/bureau/class/m_aws.php b/awstats/bureau/class/m_aws.php index 29827ae5..bcf1818f 100644 --- a/awstats/bureau/class/m_aws.php +++ b/awstats/bureau/class/m_aws.php @@ -477,7 +477,7 @@ class m_aws { $err->raise("aws",_("Login already exist")); return false; } - $pass=crypt($pass); + $pass=_md5cr($pass); // FIXME retourner une erreur l'insert se passe pas bien $db->query("INSERT INTO aws_users (uid,login,pass) VALUES ('$cuid','$login','$pass');"); return $this->_createhtpasswd(); @@ -497,7 +497,7 @@ class m_aws { $err->raise("aws",_("Login does not exists")); // Login does not exists return false; } - $pass=crypt($pass); + $pass=_md5c($pass); $db->query("UPDATE aws_users SET pass='$pass' WHERE login='$login';"); return $this->_createhtpasswd(); } diff --git a/bureau/class/m_ftp.php b/bureau/class/m_ftp.php index 7b6e328f..32e53d81 100644 --- a/bureau/class/m_ftp.php +++ b/bureau/class/m_ftp.php @@ -298,7 +298,7 @@ class m_ftp { return false; // The error has been raised by checkPolicy() } } - $encrypted_password = crypt($pass,strrev(microtime(true))); + $encrypted_password = _md5cr($pass,strrev(microtime(true))); $db->query("UPDATE ftpusers SET name='".$full_login."', password='', encrypted_password='$encrypted_password', homedir='$absolute', uid='$cuid' WHERE id='$id';"); } else { $db->query("UPDATE ftpusers SET name='".$full_login."', homedir='$absolute', uid='$cuid' WHERE id='$id';"); @@ -381,7 +381,7 @@ class m_ftp { } if ($quota->cancreate("ftp")) { - $encrypted_password = crypt($pass,strrev(microtime(true))); + $encrypted_password = _md5cr($pass,strrev(microtime(true))); $db->query("INSERT INTO ftpusers (name,password, encrypted_password,homedir,uid) VALUES ('".$full_login."', '', '$encrypted_password', '$absolute', '$cuid')"); return true; } else {