Skip to content

Commit 258684b

Browse files
authored
Merge pull request #2807 from istiak101/main
Fix: nameserver A record validation
2 parents 79bcc31 + 61b32cc commit 258684b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

func/domain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ is_dns_nameserver_valid() {
622622
remote=$(echo $r |grep ".$domain.$")
623623
if [ -n "$remote" ]; then
624624
zone=$USER_DATA/dns/$d.conf
625-
a_record=$(echo $r |cut -f 1 -d '.')
625+
a_record=${r%.$d.}
626626
n_record=$(grep "RECORD='$a_record'" $zone| grep "TYPE='A'")
627627
if [ -z "$n_record" ]; then
628628
check_result "$E_NOTEXIST" "IN A $a_record.$d does not exist"

0 commit comments

Comments
 (0)