From fac9bdf415ebcd717cce3a68b57a85cb5e47e4b0 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 4 Jul 2015 01:35:50 +0000 Subject: [PATCH 1/2] made email a requirement for ssl generation --- web/generate/ssl/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/web/generate/ssl/index.php b/web/generate/ssl/index.php index 2d093db2..233e826c 100644 --- a/web/generate/ssl/index.php +++ b/web/generate/ssl/index.php @@ -40,6 +40,7 @@ if (empty($_POST['v_country'])) $errors[] = __('country'); if (empty($_POST['v_state'])) $errors[] = __('domain'); if (empty($_POST['v_locality'])) $errors[] = __('city'); if (empty($_POST['v_org'])) $errors[] = __('organization'); +if (empty($_POST['v_email'])) $errors[] = __('email'); $v_domain = $_POST['v_domain']; $v_email = $_POST['v_email']; $v_country = $_POST['v_country']; From 882625a279dfe6f3f83f5df4c6c26d4146fa0e6a Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 4 Jul 2015 02:01:42 +0000 Subject: [PATCH 2/2] Added a check for username length --- web/add/user/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/add/user/index.php b/web/add/user/index.php index 26de1020..32f91562 100644 --- a/web/add/user/index.php +++ b/web/add/user/index.php @@ -50,6 +50,11 @@ if (!empty($_POST['ok'])) { $pw_len = strlen($_POST['v_password']); if ($pw_len < 6 ) $_SESSION['error_msg'] = __('Password is too short.',$error_msg); } + // Check username length + if (empty($_SESSION['error_msg'])) { + $username_len = strlen($_POST['v_username']); + if ($username_len > 12) $_SESSION['error_msg'] = __('Username is too long. Maximum 12 characters', $error_msg); + } // Protect input $v_username = escapeshellarg($_POST['v_username']);