Skip to content

Commit 7f3cda8

Browse files
committed
is_name? returns false if value is ip address
1 parent 29a63f3 commit 7f3cda8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rex/socket.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def self.support_ipv6?
133133
# Determine whether this is a valid DNS name without trying to resolve it
134134
#
135135
def self.is_name?(name)
136-
return false if name.length > 253
136+
return false if name.length > 253 || name =~ MATCH_IPV4 || name =~ MATCH_IPV6
137137
name.delete_suffix('.') =~ MATCH_DNS_NAME ? (name =~ /\s/).nil? : false
138138
end
139139

0 commit comments

Comments
 (0)