Skip to content

Commit 163b56c

Browse files
committed
bugfix: fix the vhost security configuration
The modified variable was never passed to the template, resulting in a bad configuration of the vhost security if secrule were removed. Signed-off-by: Julien Godin <julien.godin@camptocamp.com>
1 parent 49265fb commit 163b56c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

manifests/vhost.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2832,10 +2832,10 @@
28322832
$security_params = {
28332833
'modsec_disable_vhost' => $modsec_disable_vhost,
28342834
'modsec_audit_log_destination' => $modsec_audit_log_destination,
2835-
'_modsec_disable_ids' => $modsec_disable_ids,
2835+
'_modsec_disable_ids' => $_modsec_disable_ids,
28362836
'modsec_disable_ips' => $modsec_disable_ips,
2837-
'_modsec_disable_msgs' => $modsec_disable_msgs,
2838-
'_modsec_disable_tags' => $modsec_disable_tags,
2837+
'_modsec_disable_msgs' => $_modsec_disable_msgs,
2838+
'_modsec_disable_tags' => $_modsec_disable_tags,
28392839
'modsec_body_limit' => $modsec_body_limit,
28402840
'modsec_inbound_anomaly_threshold' => $modsec_inbound_anomaly_threshold,
28412841
'modsec_outbound_anomaly_threshold' => $modsec_outbound_anomaly_threshold,

templates/vhost/_security.epp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<IfModule mod_security2.c>
22
<% if $modsec_disable_vhost {-%>
33
SecRuleEngine Off
4+
<% } else { -%>
5+
SecRuleEngine On
46
<% } -%>
57
<% if $modsec_audit_log_destination {-%>
68
SecAuditLog "<%= $modsec_audit_log_destination %>"

0 commit comments

Comments
 (0)