1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-11 03:59:15 +00:00

add get_random_bytes() in case openssl_random_pseudo_bytes() is unavailable

This commit is contained in:
Andrew Dolgov
2012-01-23 22:04:01 +04:00
parent 098df83ba6
commit 8db5d8ea6d
4 changed files with 21 additions and 8 deletions

View File

@@ -52,7 +52,7 @@ class Pref_Prefs extends Protected_Handler {
if (db_num_rows($result) == 1) {
$new_salt = substr(bin2hex(openssl_random_pseudo_bytes(125)), 0, 250);
$new_salt = substr(bin2hex(get_random_bytes(125)), 0, 250);
$new_pw_hash = encrypt_password($new_pw, $new_salt, true);
db_query($this->link, "UPDATE ttrss_users SET