Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0

Conflicts:
	htdocs/core/class/hookmanager.class.php
	htdocs/core/lib/security2.lib.php
This commit is contained in:
Laurent Destailleur 2020-10-30 04:26:09 +01:00
commit 1a02504792

View File

@ -516,14 +516,11 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len
{
$numbers = "ABCDEF";
$max = strlen($numbers) - 1;
if (function_exists('random_int')) // Cryptographic random
{
if (function_exists('random_int')) { // Cryptographic random
$tmp = random_int(0, $max);
$generated_password = str_replace($replaceambiguouschars, $numbers[$tmp], $generated_password);
}
else
{
$tmp = random_int(0, $max);
} else {
$tmp = mt_rand(0, $max);
$generated_password = str_replace($replaceambiguouschars, $numbers[$tmp], $generated_password);
}
}