From 57e1a375cbd2db9741ff19167813344f8eff5772 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 4 Oct 2025 14:32:18 +0200 Subject: Strengthen some crypto (#8061) For login, tokens, nonces --- lib/lib_install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/lib_install.php') diff --git a/lib/lib_install.php b/lib/lib_install.php index 44bedd218..28827f0d6 100644 --- a/lib/lib_install.php +++ b/lib/lib_install.php @@ -73,7 +73,7 @@ function checkRequirements(string $dbType = ''): array { } function generateSalt(): string { - return sha1(uniqid('' . mt_rand(), true) . implode('', stat(__FILE__) ?: [])); + return hash('sha256', uniqid(more_entropy: true) . implode('', stat(__FILE__) ?: []) . random_bytes(32)); } /** -- cgit v1.2.3