Skip to content

Commit 551ca37

Browse files
committed
Merge branch 'master' of github.com:serghey-rodin/vesta
2 parents 13d3fd4 + 2e67a9d commit 551ca37

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

web/add/user/index.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
$pw_len = strlen($_POST['v_password']);
5151
if ($pw_len < 6 ) $_SESSION['error_msg'] = __('Password is too short.',$error_msg);
5252
}
53+
// Check username length
54+
if (empty($_SESSION['error_msg'])) {
55+
$username_len = strlen($_POST['v_username']);
56+
if ($username_len > 12) $_SESSION['error_msg'] = __('Username is too long. Maximum 12 characters', $error_msg);
57+
}
5358

5459
// Protect input
5560
$v_username = escapeshellarg($_POST['v_username']);

web/generate/ssl/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
if (empty($_POST['v_state'])) $errors[] = __('domain');
4141
if (empty($_POST['v_locality'])) $errors[] = __('city');
4242
if (empty($_POST['v_org'])) $errors[] = __('organization');
43+
if (empty($_POST['v_email'])) $errors[] = __('email');
4344
$v_domain = $_POST['v_domain'];
4445
$v_email = $_POST['v_email'];
4546
$v_country = $_POST['v_country'];

0 commit comments

Comments
 (0)