Skip to content

Commit a27f6ae

Browse files
authored
Merge pull request hestiacp#1747 from jaapmarcus/fix/1746-tld-less-domains
Prevent creation tld less domains
2 parents d6eb4bc + 7436d64 commit a27f6ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

func/main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ is_user_format_valid() {
623623
is_domain_format_valid() {
624624
object_name=${2-domain}
625625
exclude="[!|@|#|$|^|&|*|(|)|+|=|{|}|:|,|<|>|?|_|/|\|\"|'|;|%|\`| ]"
626-
if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ "\.\." ]] || [[ $1 =~ "$(printf '\t')" ]]; then
626+
if [[ $1 =~ $exclude ]] || [[ $1 =~ ^[0-9]+$ ]] || [[ $1 =~ "\.\." ]] || [[ $1 =~ "$(printf '\t')" ]] || [[ "$1" = "www" ]]; then
627627
check_result $E_INVALID "invalid $object_name format :: $1"
628628
fi
629629
}

0 commit comments

Comments
 (0)