mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -07:00
Fix is_format_valid 'user'
Error is showing but script isn't stopping when entering an invalid user.
This commit is contained in:
parent
e6d6e19032
commit
8ea7cf60d3
1 changed files with 2 additions and 2 deletions
|
@ -465,12 +465,12 @@ sync_cron_jobs() {
|
||||||
is_user_format_valid() {
|
is_user_format_valid() {
|
||||||
if [ ${#1} -eq 1 ]; then
|
if [ ${#1} -eq 1 ]; then
|
||||||
if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then
|
if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then
|
||||||
echo "invalid $2 format :: $1"
|
check_result $E_INVALID "invalid $2 format :: $1"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
|
if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
|
||||||
then
|
then
|
||||||
echo "invalid $2 format :: $1"
|
check_result $E_INVALID "invalid $2 format :: $1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue