Commit 3c99551f authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Removed SHA256 auto password creation

parent 6342f986
Pipeline #9307 passed with stage
in 14 seconds
......@@ -120,23 +120,6 @@ function xmlrpc_recover_account_from_confirmation_key($method, $args) {
return $result;
}
if ($algo == SHA256) {
// When trying to log in with a phone account on an app that only supports SHA-256, create a new password for it if it doesn't exists
// This won't prevent already logged in users with MD5 password to use their account
$pwd = generate_password();
$sha256_password = new Password($db);
$sha256_password->account_id = $account->id;
$sha256_password->password = hash_password($account->username, $pwd, $domain, SHA256);
$sha256_password->algorithm = SHA256;
$sha256_password->create();
$result = array(
"password" => $sha256_password->password,
"algorithm" => $sha256_password->algorithm
);
return $result;
}
return PASSWORD_NOT_FOUND;
}
......
......@@ -208,19 +208,6 @@ function xmlrpc_activate_phone_account($method, $args) {
return $password->password;
}
if ($algo == SHA256) {
// When trying to log in with a phone account on an app that only supports SHA-256, create a new password for it if it doesn't exists
// This won't prevent already logged in users with MD5 password to use their account
$pwd = generate_password();
$sha256_password = new Password($db);
$sha256_password->account_id = $account->id;
$sha256_password->password = hash_password($account->username, $pwd, $domain, SHA256);
$sha256_password->algorithm = SHA256;
$sha256_password->create();
return $sha256_password->password;
}
return PASSWORD_NOT_FOUND;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment