mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix to imporve randomness of the salt
https://github.com/webmin/webmin/pull/1669#discussion_r901011178
This commit is contained in:
5
setup.pl
5
setup.pl
@@ -435,8 +435,9 @@ else {
|
||||
}
|
||||
|
||||
# Generate random
|
||||
$salt8 = substr(time(), -8);
|
||||
$salt2 = substr(time(), -2);
|
||||
@saltbase = ('a'..'z', 'A'..'Z', '0'..'9', split(//, time()));
|
||||
$salt8 = join('', map ($saltbase[rand(@saltbase)], 1..8));
|
||||
$salt2 = join('', map ($saltbase[rand(@saltbase)], 1..2));
|
||||
|
||||
# Create users file
|
||||
open(UFILE, ">$ufile");
|
||||
|
||||
Reference in New Issue
Block a user