From 5b1b2687b3ca1f3eec4376816d1bf9a31a45eeb7 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 12 May 2020 11:07:46 -0600 Subject: [PATCH] Fix extension edit password length and strength. --- app/extensions/extension_edit.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 3454c094ea..30017de82a 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -315,15 +315,18 @@ } else { + //get the password length and strength + $password_length = $_SESSION["extension"]["password_length"]["numeric"]; + $password_strength = $_SESSION["extension"]["password_strength"]["numeric"]; + //extension does not exist add it if ($action == "add" || $range > 1) { $extension_uuid = uuid(); $voicemail_uuid = uuid(); - $password = generate_password(); + $password = generate_password($password_length, $password_strength); } - //prepare the values - //mwi account + //prepare the values for mwi account if (strlen($mwi_account) > 0) { if (strpos($mwi_account, '@') === false) { if (count($_SESSION["domains"]) > 1) { @@ -337,10 +340,10 @@ //generate a password if ($action == "add" && strlen($password) == 0) { - $password = generate_password(); + $password = generate_password($password_length, $password_strength); } if ($action == "update" && permission_exists('extension_password') && strlen($password) == 0) { - $password = generate_password(); + $password = generate_password($password_length, $password_strength); } //create the data array @@ -1962,4 +1965,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>