We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5acec8 commit 430abcdCopy full SHA for 430abcd
func/main.sh
@@ -478,9 +478,8 @@ is_user_format_valid() {
478
# Domain format validator
479
is_domain_format_valid() {
480
object_name=${2-domain}
481
- mask1='(([[:alnum:]](-?[[:alnum:]])*)\.)'
482
- mask2='*[[:alnum:]](-?[[:alnum:]])+\.[[:alnum:]]{2,}'
483
- if ! [[ "$1" =~ ^${mask1}${mask2}$ ]]; then
+ exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]"
+ if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ \.\. ]]; then
484
check_result $E_INVALID "invalid $object_name format :: $1"
485
fi
486
}
0 commit comments