summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-07-19 11:21:52 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-19 19:56:05 -0700
commit40e6f02dd2ca9a7d8e2f1de00e83c46974b5ec6e (patch)
tree9512a6053821672f17be8cec60301637aebbb1d2 /lib
parentd87a2e39d1a6104c52b1213a654ec9d58d0bff7f (diff)
downloadpuppet-40e6f02dd2ca9a7d8e2f1de00e83c46974b5ec6e.tar.gz
puppet-40e6f02dd2ca9a7d8e2f1de00e83c46974b5ec6e.tar.xz
puppet-40e6f02dd2ca9a7d8e2f1de00e83c46974b5ec6e.zip
Tweak to fix for #4233 -- only accept word chars in types
With the title carrying semantic information it may contain arbitrary chars; when parsing a ref we only want word chars in the type (up to the first open square bracket) and everything else, enclosed in "[" / "]" to the end of the string, is the title.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/resource/catalog.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb
index 4ac99eeea..9b5e68fca 100644
--- a/lib/puppet/resource/catalog.rb
+++ b/lib/puppet/resource/catalog.rb
@@ -57,7 +57,7 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
end
def title_key_for_ref( ref )
- ref =~ /^(.+)\[(.*)\]/m
+ ref =~ /^(\w+)\[(.*)\]$/m
[$1, $2]
end