From 40e6f02dd2ca9a7d8e2f1de00e83c46974b5ec6e Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Mon, 19 Jul 2010 11:21:52 -0700 Subject: 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. --- lib/puppet/resource/catalog.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit