File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -760,7 +760,7 @@ is_user_format_valid() {
760760
761761 # Only for new users
762762 if [[ " $FROM_V_ADD_USER " == " true" ]]; then
763- if ! [[ " $1 " =~ ^[a-zA-Z][-| . | _[:alnum:]]{0,28}[[:alnum:]]$ ]]; then
763+ if ! [[ " $1 " =~ ^[a-zA-Z][-| _[:alnum:]]{0,28}[[:alnum:]]$ ]]; then
764764 check_result " $E_INVALID " " invalid $2 format :: $1 "
765765 fi
766766 fi
Original file line number Diff line number Diff line change @@ -402,6 +402,13 @@ function check_ip_not_banned(){
402402 assert_output --partial ' Error: The user name'
403403}
404404
405+ @test " User: Add new user Failed 7" {
406+ run v-add-user ' hello.com' $user $user @hestiacp2.com default " Super Test"
407+ assert_failure $E_INVALID
408+ assert_output --partial ' Error: invalid user format'
409+ }
410+
411+
405412@test " User: Add new user Success 1" {
406413 run v-add-user ' jaap01' $user $user @hestiacp2.com default " Super Test"
407414 assert_success
You can’t perform that action at this time.
0 commit comments