summaryrefslogtreecommitdiff
path: root/classes/auth
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-01 15:24:18 +0300
committerAndrew Dolgov <[email protected]>2021-03-01 15:24:18 +0300
commit6359259dbb1e8d5b569f569a7089abffd9259d30 (patch)
tree69fc8e95b55d4c9ab0e3345e6f52d3c5632f038a /classes/auth
parent320503dd3911de93d059ebe1ba8b96004d8f6b03 (diff)
simplify internal authentication code and bump default algo to SSHA-512
Diffstat (limited to 'classes/auth')
-rw-r--r--classes/auth/base.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/auth/base.php b/classes/auth/base.php
index f18cc2d2d..9b2f630c0 100644
--- a/classes/auth/base.php
+++ b/classes/auth/base.php
@@ -23,8 +23,8 @@ abstract class Auth_Base extends Plugin implements IAuthModule {
if (!$password) $password = make_password();
- $salt = substr(bin2hex(get_random_bytes(125)), 0, 250);
- $pwd_hash = encrypt_password($password, $salt, true);
+ $salt = UserHelper::get_salt();
+ $pwd_hash = UserHelper::hash_password($password, $salt, UserHelper::HASH_ALGOS[0]);
$sth = $this->pdo->prepare("INSERT INTO ttrss_users
(login,access_level,last_login,created,pwd_hash,salt)