Merge pull request #131 from jaapmarcus/patch-1

Regex string threaded literally instead as regex
This commit is contained in:
myvesta 2021-11-07 15:11:34 +01:00 committed by GitHub
commit 378108cd39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -551,7 +551,7 @@ is_user_format_valid() {
is_domain_format_valid() { is_domain_format_valid() {
object_name=${2-domain} object_name=${2-domain}
exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]" exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]"
if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ "\.\." ]] || [[ $1 =~ "$(printf '\t')" ]]; then if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ \.\. ]] || [[ $1 =~ $(printf '\t') ]]; then
check_result $E_INVALID "invalid $object_name format :: $1" check_result $E_INVALID "invalid $object_name format :: $1"
fi fi
} }