From 291837061ba13647f49cc32092fd0a3ec89d51ed Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 24 Aug 2021 16:31:13 +0200 Subject: [statistics] Support new json-format of hardware info from client We now try to use JSON output mode from any tool on the client to supply information, for easier parsability and hopefully, a more stable format. --- inc/crypto.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/crypto.inc.php') diff --git a/inc/crypto.inc.php b/inc/crypto.inc.php index 56f5073c..d3dd60dc 100644 --- a/inc/crypto.inc.php +++ b/inc/crypto.inc.php @@ -10,7 +10,8 @@ class Crypto */ public static function hash6($password) { - $salt = substr(str_replace('+', '.', base64_encode(pack('N4', mt_rand(), mt_rand(), mt_rand(), mt_rand()))), 0, 16); + $salt = substr(str_replace('+', '.', + base64_encode(pack('N4', mt_rand(), mt_rand(), mt_rand(), mt_rand()))), 0, 16); $hash = crypt($password, '$6$' . $salt); if (strlen($hash) < 60) Util::traceError('Error hashing password using SHA-512'); return $hash; -- cgit v1.2.3-55-g7522