File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -620,6 +620,16 @@ validate_format_domain_alias() {
620620}
621621
622622# Database
623+ validate_format_database () {
624+ exclude=" [!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|.|<|>|?|/|\|\" |'|;|%|\` | ]"
625+ if [[ " $1 " =~ $exclude ]] || [ 65 -le ${# 1} ]; then
626+ echo " Error: $2 $1 is not valid"
627+ log_event " $E_INVALID " " $EVENT "
628+ exit $E_INVALID
629+ fi
630+ }
631+
632+ # Database user
623633validate_format_database () {
624634 exclude=" [!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|.|<|>|?|/|\|\" |'|;|%|\` | ]"
625635 if [[ " $1 " =~ $exclude ]] || [ 17 -le ${# 1} ]; then
@@ -761,7 +771,7 @@ validate_format(){
761771 database) validate_format_database " $arg " ' database' ;;
762772 day) validate_format_mhdmw " $arg " $arg_name ;;
763773 dbpass) validate_format_password " $arg " ;;
764- dbuser) validate_format_database " $arg " ' db_user' ;;
774+ dbuser) validate_format_duser " $arg " ' db_user' ;;
765775 dkim) validate_format_boolean " $arg " ' dkim' ;;
766776 dkim_size) validate_format_key_size " $arg " ;;
767777 domain) validate_format_domain " $arg " ' domain' ;;
You can’t perform that action at this time.
0 commit comments