Skip to content

Commit 664c091

Browse files
Merge pull request hestiacp#791 from tjebbeke/patch-6
Fix user validation
2 parents 2a647c3 + 8ea7cf6 commit 664c091

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

func/main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,12 +467,12 @@ sync_cron_jobs() {
467467
is_user_format_valid() {
468468
if [ ${#1} -eq 1 ]; then
469469
if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then
470-
echo "invalid $2 format :: $1"
470+
check_result $E_INVALID "invalid $2 format :: $1"
471471
fi
472472
else
473473
if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
474474
then
475-
echo "invalid $2 format :: $1"
475+
check_result $E_INVALID "invalid $2 format :: $1"
476476
fi
477477
fi
478478
}

0 commit comments

Comments
 (0)