Created
June 11, 2013 07:18
-
-
Save anonymous/5754997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git create-mailbox.php create-mailbox.php | |
index c8ec29a..66d6147 100644 | |
--- create-mailbox.php | |
+++ create-mailbox.php | |
@@ -131,6 +131,16 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") | |
} | |
} | |
+ $min_length = $CONF['min_password_length']; | |
+ if($min_length > 0 && strlen($fPassword) < $min_length) { | |
+ $error = 1; | |
+ $tUsername = escape_string ($_POST['fUsername']); | |
+ $tName = $fName; | |
+ $tQuota = $fQuota; | |
+ $tDomain = $fDomain; | |
+ $pCreate_mailbox_password_text = '<span class="error_msg">' . sprintf($PALANG['pPasswordTooShort'], $min_length) . '</span>'; | |
+ } | |
+ | |
if ($CONF['quota'] == "YES") | |
{ | |
if (!check_quota ($fQuota, $fDomain)) | |
diff --git functions.inc.php functions.inc.php | |
index 654dfd2..56b5afb 100644 | |
--- functions.inc.php | |
+++ functions.inc.php | |
@@ -2336,6 +2336,12 @@ function create_admin($fUsername, $fPassword, $fPassword2, $fDomains, $no_genera | |
} | |
} | |
+ $min_length = $CONF['min_password_length']; | |
+ if($min_length > 0 && strlen($fPassword) < $min_length) { | |
+ $error = 1; | |
+ $pAdminCreate_admin_password_text = '<span class="error_msg">' . sprintf($PALANG['pPasswordTooShort'], $min_length) . '</span>'; | |
+ } | |
+ | |
if ($error != 1) | |
{ | |
$password = pacrypt($fPassword); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment