Skip to content

Commit 98e5289

Browse files
committed
Fix CI
A required variable in the template does not exist in the class parameters. Maybe nobody use this and we can just ignore this for the next few weeks RedHat 7 (the only OS exercising this code path) is supported?
1 parent 832f318 commit 98e5289

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

templates/mod/security_crs.conf.epp

+18
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,24 @@ SecAction \
154154
"id:'900004', \
155155
phase:1, \
156156
t:none, \
157+
<%-
158+
# We are here in a section that in only evaluated on RedHat 7 and older.
159+
#
160+
# The apache::mod::security class does not have an $anomaly_score_blocking
161+
# parameter, the ERP template was therefore using an undefined variable,
162+
# interpreted as `nil` and which resulted in an empty string.
163+
#
164+
# With the conversion to EPP, Puppet now raise an error when an undefined
165+
# variable is used. In order to unbreak the test suite, we set this
166+
# variable to "on" statically bellow. Maybe this is not what you want and
167+
# a proper fix is welcome. The fact that RedHat 7 reach EOL in a few weeks
168+
# at the time this comment is written, I refrained for a proper fix because
169+
# nobody complained it was broken, and consequently this whole code seems
170+
# not to be used. We will be happy to see it vanish when support for
171+
# RedHat 7 will be removed.
172+
warning("Congratulation! You use a code path that has always been broken, check the code for fixing this!")
173+
$anomaly_score_blocking = 'on'
174+
-%>
157175
setvar:tx.anomaly_score_blocking=<%= $anomaly_score_blocking -%>, \
158176
nolog, \
159177
pass"

0 commit comments

Comments
 (0)