File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -594,10 +594,25 @@ is_common_format_valid() {
594594 check_result $E_INVALID " invalid $2 format :: $1 "
595595 fi
596596 if [[ $1 =~ \* ]]; then
597- if [ " $( echo $1 | grep -o ' * ' | wc -l) " -gt 1 ] ; then
598- check_result $E_INVALID " invalid $2 format :: $1 "
597+ if [[ " $( echo $1 | grep -o ' \*\. ' | wc -l) " -eq 0 ]] && [[ $1 != ' * ' ]] ; then
598+ check_result $E_INVALID " invalid $2 format :: $1 "
599599 fi
600600 fi
601+ if [[ $( echo -n " $1 " | tail -c 1) =~ [^a-zA-Z0-9_* @] ]]; then
602+ check_result $E_INVALID " invalid $2 format :: $1 "
603+ fi
604+ if [[ $( echo -n " $1 " | grep -c ' \.\.' ) -gt 0 ]]; then
605+ check_result $E_INVALID " invalid $2 format :: $1 "
606+ fi
607+ if [[ $( echo -n " $1 " | head -c 1) =~ [^a-zA-Z0-9_* @] ]]; then
608+ check_result $E_INVALID " invalid $2 format :: $1 "
609+ fi
610+ if [[ $( echo -n " $1 " | grep -c ' \-\-' ) -gt 0 ]]; then
611+ check_result $E_INVALID " invalid $2 format :: $1 "
612+ fi
613+ if [[ $( echo -n " $1 " | grep -c ' \_\_' ) -gt 0 ]]; then
614+ check_result $E_INVALID " invalid $2 format :: $1 "
615+ fi
601616}
602617
603618# Database format validator
You can’t perform that action at this time.
0 commit comments