From: IBBoard Date: Wed, 23 Sep 2020 19:58:09 +0000 (+0100) Subject: Fix extra quotes in firewall string matching X-Git-Tag: v2.6.0~2^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=739f1e66b7b3efe91edf96df4b4866f677cfef39;p=puppet-modules%2Fpuppetlabs-firewall.git Fix extra quotes in firewall string matching As reported by Steve Traylon[1] and @patricknelson[2], the munging adds extra quotes to the string. This breaks the string matching in iptables, as it looks for literal single quotes in the match. Removing the munging fixes this. [1] https://tickets.puppetlabs.com/browse/MODULES-3454?focusedCommentId=686988&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-686988 [2] https://github.com/puppetlabs/puppetlabs-firewall/commit/3655c6bd33d662a3813c2f66cd0bc5889c68c2c2#diff-379160b60a9bdf297b92a51d20efd8c3R1426 --- diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index 7ac3fdb..2b315a4 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -2062,10 +2062,6 @@ Puppet::Type.newtype(:firewall) do String matching feature. Matches the packet against the pattern given as an argument. PUPPETCODE - - munge do |value| - _value = "'" + value + "'" - end end newproperty(:string_hex) do