We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fcd2f53 + b693c87 commit 647e9bcCopy full SHA for 647e9bc
1 file changed
lib/puppet/parser/functions/is_domain_name.rb
@@ -13,16 +13,16 @@ module Puppet::Parser::Functions
13
"given #{arguments.size} for 1")
14
end
15
16
+ # Only allow string types
17
+ return false unless arguments[0].is_a?(String)
18
+
19
domain = arguments[0].dup
20
21
# Limits (rfc1035, 3.1)
22
domain_max_length=255
23
label_min_length=1
24
label_max_length=63
25
- # Only allow string types
- return false unless domain.is_a?(String)
-
26
# Allow ".", it is the top level domain
27
return true if domain == '.'
28
0 commit comments