summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2009-12-21 16:45:54 -0800
committerJames Turnbull <james@lovedthanlost.net>2009-12-24 00:04:05 +1100
commite4bb5294d9e13d73a87b79c65039e2f6a15b2815 (patch)
treea38e5702fbdb714432c403bf03ae87b097e12d91 /lib
parent776be7c8fe96bc2505d60470eedea220aa60d276 (diff)
downloadpuppet-e4bb5294d9e13d73a87b79c65039e2f6a15b2815.tar.gz
puppet-e4bb5294d9e13d73a87b79c65039e2f6a15b2815.tar.xz
puppet-e4bb5294d9e13d73a87b79c65039e2f6a15b2815.zip
Fix for #2967 (RFC-1123 problem and regression on wildcarded domains)
The core bug here was a regression introduced by my IPv6 patch. Wildcarded domains are stored as ["com","reductivelabs","*"] but the code in question was assuming it was in normal order. Added tests to prevet recurrence. Signed-off-by: Markus Roberts <Markus@reality.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/network/authstore.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/network/authstore.rb b/lib/puppet/network/authstore.rb
index 796d3d830..a7029a0a0 100755
--- a/lib/puppet/network/authstore.rb
+++ b/lib/puppet/network/authstore.rb
@@ -240,7 +240,7 @@ module Puppet
# Change to /^(\w[-\w]*\.)+[-\w]+\.?$/ for FQDN support
[:domain,:exact,nil,munge_name(value)]
when /^\*(\.(\w[-\w]*)){1,}$/ # *.domain.com
- host_sans_star = munge_name(value)[1..-1]
+ host_sans_star = munge_name(value)[0..-2]
[:domain,:inexact,host_sans_star.length,host_sans_star]
when /\$\d+/ # a backreference pattern ala $1.reductivelabs.com or 192.168.0.$1 or $1.$2
[:dynamic,:exact,nil,munge_name(value)]