Skip to content

Commit 09cd26b

Browse files
committed
change: encapsulate provided SecAction string in double quotes to allow for more varied definitions
1 parent dd4359a commit 09cd26b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spec/classes/mod/security_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
)
189189
}
190190

191-
it { is_expected.to contain_file('/etc/httpd/modsecurity.d/custom_rules/custom_01_rules.conf').with_content %r{^\s*.*id:199999,phase:1,pass,nolog,t:none,initcol:global=global$} }
191+
it { is_expected.to contain_file('/etc/httpd/modsecurity.d/custom_rules/custom_01_rules.conf').with_content %r{^\s*.*"id:199999,phase:1,pass,nolog,t:none,initcol:global=global"$} }
192192
end
193193

194194
describe 'with CRS parameters' do
@@ -362,7 +362,7 @@
362362
)
363363
}
364364

365-
it { is_expected.to contain_file('/etc/modsecurity/custom_rules/custom_01_rules.conf').with_content %r{\s*.*id:199999,phase:1,pass,nolog,t:none,initcol:global=global$} }
365+
it { is_expected.to contain_file('/etc/modsecurity/custom_rules/custom_01_rules.conf').with_content %r{\s*.*"id:199999,phase:1,pass,nolog,t:none,initcol:global=global"$} }
366366
end
367367

368368
describe 'with absolute path to activated rule' do

templates/mod/security_custom.conf.epp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is managed by puppet, any direct modification will be overwritten.
22
<% if $custom_actions_set and !($custom_actions_set.empty) { -%>
33
<% $custom_actions_set.each |$secaction| { -%>
4-
SecAction <%= $secaction %>
4+
SecAction "<%= $secaction %>"
55
<% } -%>
66
<% } -%>
77

0 commit comments

Comments
 (0)