From a9872a25e1a97bc2938fe8f2bbb13adeb48bab36 Mon Sep 17 00:00:00 2001 From: Robert Klose Date: Wed, 3 Aug 2016 10:14:01 +1000 Subject: [PATCH] Fixing issue with double quotes being removed when part of the comment --- lib/puppet/provider/firewall/iptables.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index f599faa..ac62fea 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -613,7 +613,7 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir def delete_args # Split into arguments - line = properties[:line].gsub(/^\-A /, '-D ').split(/\s(?=(?:[^"]|"[^"]*")*$)/).map{|v| v.gsub(/"/, '')} + line = properties[:line].gsub(/^\-A /, '-D ').split(/\s(?=(?:[^"]|"[^"]*")*$)/).map{|v| v.gsub(/^"/, '').gsub(/"$/, '')} line.unshift("-t", properties[:table]) end -- 2.45.2