瀏覽代碼

Merge branch 'master' of github.com:serghey-rodin/vesta

Serghey Rodin 10 年之前
父節點
當前提交
551ca3753c
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 5 0
      web/add/user/index.php
  2. 1 0
      web/generate/ssl/index.php

+ 5 - 0
web/add/user/index.php

@@ -50,6 +50,11 @@ if (!empty($_POST['ok'])) {
         $pw_len = strlen($_POST['v_password']);
         $pw_len = strlen($_POST['v_password']);
         if ($pw_len < 6 ) $_SESSION['error_msg'] = __('Password is too short.',$error_msg);
         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
     // Protect input
     $v_username = escapeshellarg($_POST['v_username']);
     $v_username = escapeshellarg($_POST['v_username']);

+ 1 - 0
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_state'])) $errors[] = __('domain');
 if (empty($_POST['v_locality'])) $errors[] = __('city');
 if (empty($_POST['v_locality'])) $errors[] = __('city');
 if (empty($_POST['v_org'])) $errors[] = __('organization');
 if (empty($_POST['v_org'])) $errors[] = __('organization');
+if (empty($_POST['v_email'])) $errors[] = __('email');
 $v_domain = $_POST['v_domain'];
 $v_domain = $_POST['v_domain'];
 $v_email = $_POST['v_email'];
 $v_email = $_POST['v_email'];
 $v_country = $_POST['v_country'];
 $v_country = $_POST['v_country'];