generate more secure password suggestions and respect password-min-length setting
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -19,5 +19,9 @@
|
|||||||
* Generates a random password
|
* Generates a random password
|
||||||
*/
|
*/
|
||||||
function generatePassword() {
|
function generatePassword() {
|
||||||
return substr(md5(uniqid(microtime(), 1)), 24, 10);
|
global $settings;
|
||||||
|
return substr(
|
||||||
|
base64_encode(sha1(md5(uniqid(microtime(), 1))).md5(uniqid(microtime(), 1)).sha1(md5(uniqid(microtime(), 1)))),
|
||||||
|
rand(5, 50), $settings['panel']['password_min_length']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user